Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
CM Siau
Cannot send email
November 16, 2011 8:49 PM
Answer

CM Siau

Rank: New Member

Posts: 12

Join Date: November 16, 2011

Recent Posts

Dear Sir/Mdm,

I have encountered exception when sending test mail :

10:15:18,881 ERROR [MailEngine:489] Send failure (javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused))
10:15:18,884 ERROR [MailEngine:154] java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:231)
at javax.mail.Service.connect(Service.java:85)
at javax.mail.Service.connect(Service.java:70)
at javax.mail.Transport.send(Transport.java:94)
at javax.mail.Transport.send(Transport.java:48)
at com.liferay.util.mail.MailEngine._send(MailEngine.java:475)
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)

I have configured mail server ip and port in the Root/ portal-ext.properties. I tried to manual send email using sendmail is ok but using liferay to send got this exception.
Anyone can help? Thank you so much !
Jignesh Vachhani
RE: Cannot send email
November 16, 2011 9:34 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 785

Join Date: March 10, 2008

Recent Posts

Hi,


Please put here properties which you have set in portal-ext.properties .
Also i would suggest if you are sending mail from localhost please use postcast server(or any other SMTP server) so you can check your functionality properly.

Best,
Jignesh
liferaycms blog
CM Siau
RE: Cannot send email
November 16, 2011 9:38 PM
Answer

CM Siau

Rank: New Member

Posts: 12

Join Date: November 16, 2011

Recent Posts

Hi Sir.

This is the properties i put in :

mail.session.mail.pop3.host=localhost
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=
mail.session.mail.smtp.auth=false
mail.session.mail.smtp.host=(my mail server ip)
mail.session.mail.smtp.password=
mail.session.mail.smtp.port=25
mail.session.mail.smtp.user=
mail.session.mail.store.protocol=pop3
mail.session.mail.transport.protocol=smtp

i am using smtp server to send email.
Jignesh Vachhani
RE: Cannot send email
November 16, 2011 9:42 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 785

Join Date: March 10, 2008

Recent Posts

Please have a look on Mail setup link.
This is working for me please test it with your mail host.
Hope this will be useful to you.

HTH,
Jignesh
liferaycms blog
CM Siau
RE: Cannot send email
November 20, 2011 8:58 PM
Answer

CM Siau

Rank: New Member

Posts: 12

Join Date: November 16, 2011

Recent Posts

Still unable to send email.
Fateh Alchhabi
RE: Cannot send email
November 22, 2011 6:50 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

i think you have to double check the port number in you SMTP server
i did try to send email for my web portal and it work perfectly
do you use google email or other email service provider

the properties for google account is



mail.session.mail.pop3.host=pop.gmail.com
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=****@gmail.com
mail.session.mail.imap.host=imap.gmail.com
mail.session.mail.imap.port=993
mail.session.mail.store.protocol=imap
mail.session.mail.transport.protocol=smtp
mail.session.mail.smtp.host=smtp.gmail.com
mail.session.mail.smtp.password=*********
mail.session.mail.smtp.user=*****@gmail.com
mail.session.mail.smtp.port=465
mail.session.mail.smtp.auth=true
mail.session.mail.smtp.starttls.enable=true
mail.session.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
CM Siau
RE: Cannot send email
November 22, 2011 8:41 PM
Answer

CM Siau

Rank: New Member

Posts: 12

Join Date: November 16, 2011

Recent Posts

I have my own mail server. I am not using google. Not sure where the apps is calling using localhost.
Fateh Alchhabi
RE: Cannot send email
November 22, 2011 10:58 PM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

CM Siau:
I have my own mail server. I am not using google. Not sure where the apps is calling using localhost.


of course you have to check ,, even if it your own mail server ...i have my own mail server put i put the propertise like this
mail.imap.host="mail.knowmuhammad.org"
you can't just put localhost emoticon