[Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Dear All, I tried setting up email on an instance with SMTP using Google Apps settings. Following are the settings I used. hostname: smtp.gmail.com port: 465 username: x...@xxx.net password: Email sender: x...@xxx.net TLS enabled But, testing email is never received at my emaiil account.

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Thanx Morten. By bad, wrong port. But when I selected port 587, it throws out following error. * WARN 2015-12-28 16:22:00,067 Error while sending email: Cannot connect to a port number that is less than 1 ( 0 ), java.lang.IllegalArgumentException: Cannot connect to a port number that is less

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Thanx Morten, it's Version:2.21Build revision:20850Build date:2015-10-26 01:19 On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav Hansen wrote: > Ok > > What version of DHIS 2? I'm adding in Lars, I think he has set it up for > gmail before (I haven't). > > -- > Morten > > On

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Could you give me the output of: SERVER/api/systemSettings/keyEmailPort -- Morten On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon wrote: > Thanx Morten, > > it's > Version:2.21Build revision:20850Build date:2015-10-26 01:19 > > On Mon, Dec 28, 2015 at 4:48 PM, Morten Olav

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Ok, could be a bug in the settings app. -- Morten On Mon, Dec 28, 2015 at 12:43 PM, Pamod Amarakoon wrote: > Yes, when trying to send out test email after entering the email settings. > > On Mon, Dec 28, 2015 at 5:12 PM, Morten Olav Hansen > wrote: > >>

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Hi Could it be that its the wrong port? it seems like TLS requires port 587 [1] ? [1] http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm -- Morten On Mon, Dec 28, 2015 at 11:44 AM, Pamod Amarakoon wrote: > Dear All, > > I tried setting up email on an

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Right. That's what i suspected, that setting is wrong. Did you use the new setting app to set it? could you try and change between the different ports and see if the output changes for you? It could be a bug in the settings app, but I'm not sure. 0 is never a valid value for that setting. --

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Dear Morten, Deleting keyEmailPort from systemsetting table solved the problem. Thanx a lot ! On Mon, Dec 28, 2015 at 5:15 PM, Morten Olav Hansen wrote: > Ok, could be a bug in the settings app. > > -- > Morten > > On Mon, Dec 28, 2015 at 12:43 PM, Pamod Amarakoon

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
While not ideal, you could null it out with: delete from systemsetting where name='keyEmailPort'; And then it should default to TLS port. -- Morten On Mon, Dec 28, 2015 at 12:35 PM, Morten Olav Hansen wrote: > Right. That's what i suspected, that setting is wrong. Did you

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Ok What version of DHIS 2? I'm adding in Lars, I think he has set it up for gmail before (I haven't). -- Morten On Mon, Dec 28, 2015 at 11:54 AM, Pamod Amarakoon wrote: > Thanx Morten. By bad, wrong port. > > But when I selected port 587, it throws out following error. > > *

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Dear Morten, I toggled between the remaining ports 25 and 465. Both throws out "Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 2; nested exception is: java.net.SocketTimeoutException: connect timed out " I'll try the method you

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Hi, It's "0" On Mon, Dec 28, 2015 at 5:00 PM, Morten Olav Hansen wrote: > Could you give me the output of: > > SERVER/api/systemSettings/keyEmailPort > > > -- > Morten > > On Mon, Dec 28, 2015 at 12:20 PM, Pamod Amarakoon > wrote: > >> Thanx Morten, >> >>

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Morten Olav Hansen
Ok, so is this happening when you are sending out the test email? -- Morten On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon wrote: > and yes, it's the new settings app I used > > On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon wrote: > >> Dear Morten, >>

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
Yes, when trying to send out test email after entering the email settings. On Mon, Dec 28, 2015 at 5:12 PM, Morten Olav Hansen wrote: > Ok, so is this happening when you are sending out the test email? > > -- > Morten > > On Mon, Dec 28, 2015 at 12:40 PM, Pamod Amarakoon

Re: [Dhis2-devs] Setting up Email

2015-12-28 Thread Pamod Amarakoon
and yes, it's the new settings app I used On Mon, Dec 28, 2015 at 5:10 PM, Pamod Amarakoon wrote: > Dear Morten, > > I toggled between the remaining ports 25 and 465. Both throws out > > "Caused by: javax.mail.MessagingException: Could not connect to SMTP host: >