Test Email in Email Settings is not Working.

Hi all,

I have setup the email settings as:

Hostname: smtp@gmail.com

Port: 587

username: ****@gmail.com

password: ***(gmail password)

sender: ***@gmail.com

But test mail never receives to the user. Following error is coming:

Sending email to user: admin with email address:***@gmail.com to host: smtp.gmail.com:587 (EmailMessageSender.java [taskScheduler-8])

_ * WARN 2016-12-06 17:51:15,540 Could not send email: Sending the email to the following server failed : smtp.gmail.com:587, org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587_

Has anyone used the Email Settings before?

Thanks & Regards,

Sourabh Bhardwaj

Hi,

first, did you enable TLS as well?

I followed the steps listed here: https://support.google.com/mail/answer/7126229?hl=en

This works fine for me. Is there any way you misspelled your email or password?

Seemed to work without enabling POP/IMAP in my gmail account as well, but if you can’t get it to work, you should try to enable it as well I guess.

Let me know how it goes.

···

——

Stian Sandvold

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On 6 Dec 2016, at 13:36, Sourabh Bhardwaj bsourabh191@gmail.com wrote:

Hi all,

I have setup the email settings as:

Hostname: smtp@gmail.com

Port: 587

username: ****@gmail.com

password: ***(gmail password)

sender: ***@gmail.com

But test mail never receives to the user. Following error is coming:

Sending email to user: admin with email address:***@gmail.com to host: smtp.gmail.com:587 (EmailMessageSender.java [taskScheduler-8])

_ * WARN 2016-12-06 17:51:15,540 Could not send email: Sending the email to the following server failed : smtp.gmail.com:587, org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587_

Has anyone used the Email Settings before?

Thanks & Regards,

Sourabh Bhardwaj


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Also enabling the ‘less secure apps to access your account’ option in the Gmail account configured in the DHIS 2.

If this is the case, then when you log into the same account, you will find a blocked sign-in attempt notification email with the option for allowing the access.

https://www.google.com/settings/security/lesssecureapps

regards,

···

On Tue, Dec 6, 2016 at 5:16 PM, Stian Sandvold stian@dhis2.org wrote:

Hi,

first, did you enable TLS as well?

I followed the steps listed here: https://support.google.com/mail/answer/7126229?hl=en

This works fine for me. Is there any way you misspelled your email or password?

Seemed to work without enabling POP/IMAP in my gmail account as well, but if you can’t get it to work, you should try to enable it as well I guess.

Let me know how it goes.

——

Stian Sandvold

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On 6 Dec 2016, at 13:36, Sourabh Bhardwaj bsourabh191@gmail.com wrote:

Hi all,

I have setup the email settings as:

Hostname: smtp@gmail.com

Port: 587

username: ****@gmail.com

password: ***(gmail password)

sender: ***@gmail.com

But test mail never receives to the user. Following error is coming:

Sending email to user: admin with email address:***@gmail.com to host: smtp.gmail.com:587 (EmailMessageSender.java [taskScheduler-8])

_ * WARN 2016-12-06 17:51:15,540 Could not send email: Sending the email to the following server failed : smtp.gmail.com:587, org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587_

Has anyone used the Email Settings before?

Thanks & Regards,

Sourabh Bhardwaj


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Sam Kasozi
+256 788-993-565

Skype: sam.kasoziug

Thanks Stian & Sam,

I have followed your instructions and now it is working fine after enabling IMAP and less securing apps.

···

On Tue, Dec 6, 2016 at 6:41 PM, Sam Kasozi kasozis@gmail.com wrote:

Also enabling the ‘less secure apps to access your account’ option in the Gmail account configured in the DHIS 2.

If this is the case, then when you log into the same account, you will find a blocked sign-in attempt notification email with the option for allowing the access.

https://www.google.com/settings/security/lesssecureapps

regards,

Sam Kasozi
+256 788-993-565

Skype: sam.kasoziug

On Tue, Dec 6, 2016 at 5:16 PM, Stian Sandvold stian@dhis2.org wrote:

Hi,

first, did you enable TLS as well?

I followed the steps listed here: https://support.google.com/mail/answer/7126229?hl=en

This works fine for me. Is there any way you misspelled your email or password?

Seemed to work without enabling POP/IMAP in my gmail account as well, but if you can’t get it to work, you should try to enable it as well I guess.

Let me know how it goes.

——

Stian Sandvold

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On 6 Dec 2016, at 13:36, Sourabh Bhardwaj bsourabh191@gmail.com wrote:

Hi all,

I have setup the email settings as:

Hostname: smtp@gmail.com

Port: 587

username: ****@gmail.com

password: ***(gmail password)

sender: ***@gmail.com

But test mail never receives to the user. Following error is coming:

Sending email to user: admin with email address:***@gmail.com to host: smtp.gmail.com:587 (EmailMessageSender.java [taskScheduler-8])

_ * WARN 2016-12-06 17:51:15,540 Could not send email: Sending the email to the following server failed : smtp.gmail.com:587, org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587_

Has anyone used the Email Settings before?

Thanks & Regards,

Sourabh Bhardwaj


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp