SendEmailNotification fails when called from job scheduler but the same working fine while executing the activity manually.
Also, the Job running fine and didn't throw any error in Dev environment. Issue facing in Pre-prod only.
Below is the error message got from the tracer.
Caught unhandled exception : Unable to send email due to : Couldn't connect to host, port: localhost, 25; timeout 60000
what is the context given for your scheduler?
@RajeshE26 Given what you are are observing I’d think that the issue is a connectivity issue (most likely firewall) between the node where the the job scheduler is running and the SMTP server.
When you run the activity activity manually it would be executed from a web node but the job scheduler would execute it from a background node so first check the connectivity between the node marked for background processing and the SMTP server
The second thing to check is the ruleset setting for the email account instance to make sure it’s present in the system runtime context (System → General → System Runtime Context) that could also be the problem
Since the issue is only in higher environment there is a high possibility of permission issue only. Sometimes the system context privileges may not be enough to execute the actions.
Trace the job scheduler and get the exact issue. If it is due to permission configure a new access group with right permission and configure the same for your job scheduler context.
