0

I know this question is already answered, but I couldn't solve it for myself. How can I configure email for emm?

Here is my config in general setting :

Host: smtp.gmail.com
Port: 25 (also I check it using 587)
Username: myusername@gmail.com
password: my email pass
Sender email address: myusername@gmail.com
Email template: You have been registered to the to EMM. Below is the link to enroll.

but no invitation email sent to users. first I try sending invitation email to already registered user. then I check adding new user and send invitation to him.

here is the log for port 25, here is the log for port 587, here is the log for new user with port 25 and here for port 587.

Also I turn off my firewall and try again but no invitation email sent to users.

More info:

server : windows 7 (wso2 v : 1.1.0) - localhost, database : mysql

I have done these configuration using tenant which I have created.

Community
  • 1
  • 1
user3806649
  • 1,257
  • 2
  • 18
  • 42

2 Answers2

1

for solving the problem I change the emm\modules\user.js :

line 186: if(username.indexOf("@")<1) to if(username.toString().indexOf("@")<1)

and add yahoo certificate to the keystores (wso2carbon.jks, emm_truststore.jks and wso2emm.jks.)

to get yahoo certificate I run this :

openssl s_client -connect smtp.mail.yahoo.com:587 -starttls smtp

and save the Server certificate as yahoocertificate.cer.

and to add it to keystores I run this:

keytool -import -alias smtp.mail.yahoo.com -file yahoocertificate.cer -keystore "D:\EMM\Carbone_Home\repository\resources\security\wso2carbon.jks"
keytool -import -alias smtp.mail.yahoo.com -file yahoocertificate.cer -keystore "D:\EMM\Carbone_Home\repository\resources\security\emm_truststore.jks"
keytool -import -alias smtp.mail.yahoo.com -file yahoocertificate.cer -keystore "D:\EMM\Carbone_Home\repository\resources\security\wso2emm.jks"

Also I check it with gmail smtp server port 587.

user3806649
  • 1,257
  • 2
  • 18
  • 42
0

Error shows that there's a connection timeout. Gmail SMTP might be blocking your authentication request. Usually it throttles 3rd party client requests unless you disable security from your mail account settings.

Thanks

Kasun Delgolla
  • 219
  • 1
  • 8
  • also I change the email to my yahoo mail which I am able to send email using my gmail account, but no invitation mail has been sent, could you tel me which security item I should change in account setting? – user3806649 Aug 03 '15 at 13:25
  • In gmail, there's a setting which allows sending mails from 3rd party app. If you tried configuration with your gmail account and then sending invitation from the console, you must get an email from google saying the attempt was blocked. From there you will have a link to enable it. – Kasun Delgolla Aug 05 '15 at 05:22
  • You seem to be getting SSL handshake exceptions as well. Try this. http://www.java-samples.com/showtutorial.php?tutorialid=210 – Kasun Delgolla Aug 05 '15 at 05:30
  • I turn on access for less secure app through [this](https://www.google.com/settings/security/lesssecureapps), but I couldn't load smtp.gmail.com on my browser as said java-samples.com/showtutorial.php?tutorialid=210 for checking ssl handshack – user3806649 Aug 05 '15 at 18:45
  • I use self signed certificate, I add it to my [Trusted Root Certification Authorities](http://tinypic.com/r/2llybnb/8) , but it still didn't send mai. – user3806649 Aug 05 '15 at 20:19