Solved

Email Sending via sub subscription


Hello,

I have a script that is creating an email notification via FMEServerEmailGeneration. I am feeding that to a topic through the FmeServerNotifier. Works perfectly fine. I have monitored the topic and the notification comes up.

I set up an email Subscription using the following information:

https://knowledge.safe.com/articles/1455/configure-fme-server-services-to-use-gmail-1.html

I keep getting this error when I try to save the subscription.

I have checked if firewall was blocking port 465. No problem there

Funny thing is. This worked once. I was able to save the subscription. I tested it out by running the first workspace and an email was sent correctly.

I opened the subscription up and made a change to the subject line only. Ever since then, it stopped saving. And no email is being sent.

Can anyone shed light on this temperamental issue? Any help is appreciated. Thanks :)

icon

Best answer by richardatsafe 1 August 2017, 23:12

View original

9 replies

Badge +10

Hi Fariya,

I would start by double checking all the connection settings and passwords, but it may be an issue with the security settings on the Gmail account. If you use a Gmail account you have to either disable the security or if you have a corporate Gmail account you can create an exception. If that fails the log file for the notifications under core/current/subscribers/email.log should also give us some clues to what is happening.

"Note that using Gmail to send SMTP messages requires you to have to disable security on your Gmail account by following the instructions at https://www.google.com/settings/security/lesssecureapps and therefore is not recommended. Using the Gmail option for the Email Service parameter is preferred, since this will authenticate using OAuth 2.0, as recommended by Google."

Hi Fariya,

I would start by double checking all the connection settings and passwords, but it may be an issue with the security settings on the Gmail account. If you use a Gmail account you have to either disable the security or if you have a corporate Gmail account you can create an exception.  If that fails the log file for the notifications under core/current/subscribers/email.log should also give us some clues to what is happening.

"Note that using Gmail to send SMTP messages requires you to have to disable security on your Gmail account by following the instructions at https://www.google.com/settings/security/lesssecureapps and therefore is not recommended. Using the Gmail option for the Email Service parameter is preferred, since this will authenticate using OAuth 2.0, as recommended by Google."

Hello @RichardAtSafe,

 

Thanks for responding to my query. I have set "Allow less secure apps:" to "ON" and access to Google account enabled before I tried. 

 

I did not know where the log was. Right now I just accessed it: 

 

This is the message I am getting from the log: 

 

Tue-01-Aug-2017 05:35:22 PM   ERROR    pool-1-thread-1   801027 : An exception occurred. Could not connect to SMTP host: smtp.gmail.com, port: 465

Tue-01-Aug-2017 05:35:22 PM   ERROR    pool-1-thread-1   801009 : Failed to send email.javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;  nested exception is:  
followed by a bunch of code. 

 

Our office IT claims all ports are open and should not be the cause of any problem
Badge +11
Hello @RichardAtSafe,

 

Thanks for responding to my query. I have set "Allow less secure apps:" to "ON" and access to Google account enabled before I tried. 

 

I did not know where the log was. Right now I just accessed it: 

 

This is the message I am getting from the log: 

 

Tue-01-Aug-2017 05:35:22 PM   ERROR    pool-1-thread-1   801027 : An exception occurred. Could not connect to SMTP host: smtp.gmail.com, port: 465

Tue-01-Aug-2017 05:35:22 PM   ERROR    pool-1-thread-1   801009 : Failed to send email.javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;  nested exception is:  
followed by a bunch of code. 

 

Our office IT claims all ports are open and should not be the cause of any problem
@fariyafarhad - Can you attached the full log file?

 

Badge +10
Hello @RichardAtSafe,

 

Thanks for responding to my query. I have set "Allow less secure apps:" to "ON" and access to Google account enabled before I tried. 

 

I did not know where the log was. Right now I just accessed it: 

 

This is the message I am getting from the log: 

 

Tue-01-Aug-2017 05:35:22 PM   ERROR    pool-1-thread-1   801027 : An exception occurred. Could not connect to SMTP host: smtp.gmail.com, port: 465

Tue-01-Aug-2017 05:35:22 PM   ERROR    pool-1-thread-1   801009 : Failed to send email.javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;  nested exception is:  
followed by a bunch of code. 

 

Our office IT claims all ports are open and should not be the cause of any problem
If you could run the telnet test to ping gmail by following the "Using Telnet to test your connection" steps in this article that should tell us more. https://knowledge.safe.com/articles/543/floating-license-troubleshooting.html Additionally this issue has sometime be attributed to the virus scanner is blocking FME Server.

 

Userlevel 4

You may also want to verify the proxy server settings, if necessary.

@fariyafarhad - Can you attached the full log file?

 

emaillog.txt

 

Hi @RylanAtSafe I uploaded the log. The log is accumulative so I just uploaded the last bit after my attempt to send an email via fme server failed.

 

Thanks for the troubleshooting link. I'm going through them to see if I am able to find the issue.

 

 

If you could run the telnet test to ping gmail by following the "Using Telnet to test your connection" steps in this article that should tell us more. https://knowledge.safe.com/articles/543/floating-license-troubleshooting.html Additionally this issue has sometime be attributed to the virus scanner is blocking FME Server.

 

Hello @RichardAtSafe

 

I am coming back to this problem after some time. I believe our license is single-fixed. Not floating. I tried to look into the floating license troubleshooting guide. Using telnet to test connection shows me that communication is getting blocked. But I cannot follow the instructions under "If Telnet Fails". I don't seem to have the safe.lic file that needs to be altered to specify a port for fme server. Any thought?
Badge +11
Hello @RichardAtSafe

 

I am coming back to this problem after some time. I believe our license is single-fixed. Not floating. I tried to look into the floating license troubleshooting guide. Using telnet to test connection shows me that communication is getting blocked. But I cannot follow the instructions under "If Telnet Fails". I don't seem to have the safe.lic file that needs to be altered to specify a port for fme server. Any thought?
@fariyafarhad - You can ignore the "If Telnet Fails" section as it isn't applicable to your scenario.

 

As you have identified that this test failed (connecting to smtp.gmail.com over 465), you will need to open port 465 through the firewall for communication. If you cannot create this rule yourself, consider contacting an admin or IT support at your organization.

 

Hi Fariya,

I would start by double checking all the connection settings and passwords, but it may be an issue with the security settings on the Gmail account. If you use a Gmail account you have to either disable the security or if you have a corporate Gmail account you can create an exception. If that fails the log file for the notifications under core/current/subscribers/email.log should also give us some clues to what is happening.

"Note that using Gmail to send SMTP messages requires you to have to disable security on your Gmail account by following the instructions at https://www.google.com/settings/security/lesssecureapps and therefore is not recommended. Using the Gmail option for the Email Service parameter is preferred, since this will authenticate using OAuth 2.0, as recommended by Google."

@RichardAtSafe

 

It was security setting blocking the port. Our IT was being unhelpful before until now. Thank you for all your suggestions!

Reply