Forums de discussion

Not Able to Send Email from Liferay

Ankur Agarwal, modifié il y a 12 années.

Not Able to Send Email from Liferay

New Member Publications: 19 Date d'inscription: 28/03/12 Publications récentes
I am facing problems in setting up a mail server, when i click on the Forgot Password? link and provide the email id it shows request proccessed succesfully.
But i get the following error in the console :
12:23:37,689 ERROR [MailEngine:489] 554 Mail from test@liferay.com rejected for policy reasons.

12:23:37,690 ERROR [MailEngine:154] com.sun.mail.smtp.SMTPSendFailedException: 554 Mail from test@liferay.com rejected for policy reasons.

at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
at com.liferay.util.mail.MailEngine._send(MailEngine.java:465)
at com.liferay.util.mail.MailEngine.send(MailEngine.java:366)
at com.liferay.util.mail.MailEngine.send(MailEngine.java:110)
at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:101)
at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:115)
at com.liferay.mail.messaging.MailMessageListener.receive(MailMessageListener.java:43)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:61)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

Can You please provide help? Where do i need to make the changes as in Server Administration>Mail or Control Panel>Portal Settings>Main Configuration
Thanks in Advance.......
thumbnail
David H Nebinger, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
You don't have to do anything, your Liferay install is just right.

Instead, look to the stack trace and resolve the real issue. It's reporting that the email is rejected due to policy reasons. Your mail server has determined that the email should be rejected.

Since I see the test@liferay.com is being rejected, I'm guessing that it might be complaining about the sender email address. You might need to go to the Settings control panel then to the Email Notifications page and make some changes there.
thumbnail
Prakash Khanchandani, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

Expert Publications: 329 Date d'inscription: 10/02/11 Publications récentes
Check these settings:

## Mail Properties
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.host=
mail.session.mail.smtp.password=
mail.session.mail.smtp.port=25
mail.session.mail.smtp.user=
mail.session.mail.transport.protocol=smtp
thumbnail
David H Nebinger, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
These are only used during the first launch of Liferay. Afterwards, mail settings come from the database (set via the control panel).

That plus non of the settings address why test@liferay.com would have been rejected by the mail server. Obviously it is connecting to the mail server and attempting the email send...
thumbnail
Prakash Khanchandani, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

Expert Publications: 329 Date d'inscription: 10/02/11 Publications récentes
Yes exactly. Thanks.
thumbnail
Hitoshi Ozawa, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
As David said, it's probably because your email server is setup to reject email that's not in your company domain.
That's why it's rejecting email from @liferay.com.

Go to Control Panel -> Portal Settings and setup your portal's email address to be that of your company.
You may also be required to enter authorized email user and password to send email.
Ankur Agarwal, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

New Member Publications: 19 Date d'inscription: 28/03/12 Publications récentes
Hi,
Thanks Hitoshi !
I changed the domain from liferay.com to my company domain, in Control Panel>Portal Settings>General>Main Configuration Mail Domain.
But i could not find where to add the valid username and password, are we talking about Server Administration>Mail and filling up the details there?
Under Control Panel>Portal Settings>Email Notifications i also set the Senders Name and Address.
But i am still getting the same error.
Where can i view/change the policy?
If any can provide help, please...!
thumbnail
Dhrutika Parekh, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

Expert Publications: 435 Date d'inscription: 09/02/09 Publications récentes
Hi,

Yes you need to do mail setting under Server Administration> Mail

There you need to provide smtp server,user name ,password and port number.

Regards,
Dhrutika
Ankur Agarwal, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

New Member Publications: 19 Date d'inscription: 28/03/12 Publications récentes
Hi Dhrutika,
I have made the changes in the Server Administration>Mail,
But i guess my understanding is not clear can you please provide me the meaning of the fields present there and what each field represents/does:
Incoming POP Server
Incoming Port
Check Box - Use Secure Network Connection
Username
Password

Outgoing SMTP Server
Outgoing Port
Check Box - Use Secure Network Connection
Username
Password

As i am new to liferay, Thanks in adv
Ankur Agarwal, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

New Member Publications: 19 Date d'inscription: 28/03/12 Publications récentes
Hi All,
Thanks for your help!
I was finally able to set up the mail server and send mails for forgot password functionality... emoticon
For other functionalties too i am hopeful that it will work
thumbnail
Sri Sri, modifié il y a 11 années.

RE: Not Able to Send Email from Liferay

Regular Member Publications: 143 Date d'inscription: 18/10/12 Publications récentes
Ankur Agarwal:
Hi All,
Thanks for your help!
I was finally able to set up the mail server and send mails for forgot password functionality... emoticon
For other functionalties too i am hopeful that it will work



Hi, Ankur can u explain me how you achieved this, iam not able to configure the mail server for gmail, my requirement is when i add a webcontent as a user mail should be sent to all users under the organization, for this what should i do?
Roshan Qureshi, modifié il y a 12 années.

RE: Not Able to Send Email from Liferay

Regular Member Publications: 159 Date d'inscription: 24/08/10 Publications récentes
Hi Ankur,
You can follow this link which is showing step by step configuration.
It has also SMTP Setup link which shows example of setting up a SMTP mail.
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Mail+Integration+for+Liferay

Hope this will help.