Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ram A
[MailEngine:482] Failed to connect to a valid mail server.
February 6, 2013 3:34 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Hi,

I am using liferay 6.0.6.
I am getting this error in my log file.I am not sure why it is coming .
[MailEngine:482] Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: localhost, port: 25

My mail server configuration settings in Server Administration are :

Incoming pop server :
localhost
Incoming port:
110
Outgoing SMTP Server
localhost
Outgoing Port
25


Please help me to resolve this.

Thanks in advance
Ram
Siby Mathew
RE: [MailEngine:482] Failed to connect to a valid mail server.
February 6, 2013 4:55 AM
Answer

Siby Mathew

Rank: Expert

Posts: 259

Join Date: March 4, 2011

Recent Posts

Hi Ram,
Do you have a mail server configured in your "localhost" ??
You need to basically point to a working mail server ...eg: Your company's SMTP address...

Thanks,
Siby
Ram A
RE: [MailEngine:482] Failed to connect to a valid mail server.
February 6, 2013 7:44 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Siby Mathew:
Hi Ram,
Do you have a mail server configured in your "localhost" ??
You need to basically point to a working mail server ...eg: Your company's SMTP address...

Thanks,
Siby



Thanks Siby for the reply.
No Siby.Mail server is not configured .can you please let me know how to configure it. and where we have to configure it.

Can we configure it in portal-ext.properties file.


Thanks in advance
Ram A
Pranay R Patadiya
RE: [MailEngine:482] Failed to connect to a valid mail server.
February 6, 2013 11:10 AM
Answer

Pranay R Patadiya

Rank: Regular Member

Posts: 181

Join Date: February 22, 2010

Recent Posts

You can setup email server as per below from portal-ext property file

For example I have configure gmail server as email server.

###############
# Mail Server Settings
###############
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=smtp.googlemail.com
mail.session.mail.smtp.password=*********
mail.session.mail.smtp.port=465
mail.session.mail.smtp.user=abc@xyz.com
mail.session.mail.transport.protocol=smtp
mail.session.mail.smtp.starttls.enable=true


Let me know if you need anything more then this.

Regards,
Pranay
Ram A
RE: [MailEngine:482] Failed to connect to a valid mail server.
February 7, 2013 3:50 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Pranay R Patadiya:
You can setup email server as per below from portal-ext property file

For example I have configure gmail server as email server.

###############
# Mail Server Settings
###############
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=smtp.googlemail.com
mail.session.mail.smtp.password=*********
mail.session.mail.smtp.port=465
mail.session.mail.smtp.user=abc@xyz.com
mail.session.mail.transport.protocol=smtp
mail.session.mail.smtp.starttls.enable=true


Let me know if you need anything more then this.

Regards,
Pranay

Thanks Pranay for reply.
I will configure these properties in portal-ext.properties file.

When i added/updated web content it is trying to send a mail to few users.
Below is the error i am getting.
G [MailEngine:244] From: Liferay Portal Workflow Notifications <no-reply@liferay.com>
10:49:26,023 DEBUG [MailEngine:245] To: [test test <test@mail.sample.domain.com>, Soni <soni@mail.sample.domain.com>, Koen<koen@mail.sample.domain.com>, Vanden<Vanden@mail.sample.domain.com>, Ram<Ram@mail.sample.domain.com>]

10:49:26,023 DEBUG [MailEngine:246] CC: null
10:49:26,024 DEBUG [MailEngine:247] BCC: null
10:49:26,024 DEBUG [MailEngine:248] List Addresses: null
10:49:26,024 DEBUG [MailEngine:249] Subject:
10:49:26,024 DEBUG [MailEngine:250] Body: You have a new submission waiting for your review in the workflow.
10:49:26,024 DEBUG [MailEngine:251] HTML Format: true
10:49:26,024 DEBUG [MailEngine:252] Reply to: null
10:49:26,024 DEBUG [MailEngine:253] Message ID: null
10:49:26,024 DEBUG [MailEngine:254] In Reply To: null
10:49:27,117 WARN [MailEngine:482] Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: localhost, port: 25
10:49:27,117 DEBUG [MailEngine:376] Sending mail takes 1094 ms

Similarly we developed a custom portlet similar to web content portlet and when we add/update a content,it is trying to send a mail to the above users and giving this error.
i can understand that we have to configure mail settings to send a mails.

I noticed in single-approver-definition.xml in Kalio-web mail enginethat the mails should be sent to the users who are having the Administrator roles.
<assignments>
<roles>
<role>
<role-type>community</role-type>
<name>Community Administrator</name>
</role>
<role>
<role-type>community</role-type>
<name>Community Content Reviewer</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Administrator</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Content Reviewer</name>
</role>
<role>
<role-type>organization</role-type>
<name>Organization Owner</name>
</role>
<role>
<role-type>regular</role-type>
<name>Administrator</name>
</role>
<role>
<role-type>regular</role-type>
<name>Portal Content Reviewer</name>
</role>
</roles>
Is this correct?
When this mail notification should be send to those users. I mean after adding the webcontent it is creating a journal article content in liferay DB.Is the mail notification is sending when ijournalarticle is created in DB?

If i want to Stop the sending mails what i have to do?

Please anyone help me regarding these issue.

Thanks in advance
Ram A
Siby Mathew
RE: [MailEngine:482] Failed to connect to a valid mail server.
February 8, 2013 5:40 AM
Answer

Siby Mathew

Rank: Expert

Posts: 259

Join Date: March 4, 2011

Recent Posts

Its still displaying :
"Could not connect to SMTP host: localhost, port: 25"

So did you point to a working SMTP host in portal-ext.properties ?

Thanks,
Siby
Ram A
RE: [MailEngine:482] Failed to connect to a valid mail server.
February 8, 2013 5:56 AM
Answer

Ram A

Rank: Junior Member

Posts: 76

Join Date: January 16, 2013

Recent Posts

Siby Mathew:
Its still displaying :
"Could not connect to SMTP host: localhost, port: 25"

So did you point to a working SMTP host in portal-ext.properties ?

Thanks,
Siby


Thanks Siby for the reply.
Yes i configured the SMTP host .
It is working now.

i think when creating a webcontent it is creating a content in Journalarticles.When it is created it is trying t send a mail notifications.
Am i correct?

But i would like to stop the sending of mail notifications when webcontent is created/updated.
can we achieve this by using portal-ext.properties file.


Can you please help me resolve this .


Thanks in advance
Ram A