PDA

View Full Version : Schedule email doesnt send.



wolfiepup
16-Jul-2019, 09:22 AM
I can manually send a report, but if I schedule a reportnothing happens.
The DAI is installed:Dai ver6, OS MSWin 8.1, MSSql Express. I am testing it with agmail account. I tested it by setting it to send a report every 10 minutes for1 day. The ping is set to run every 5 minutes.
One thing I am not sure is stopping the process is that portneeded to be changed from 80 to 88. The customers shipping software runs onport 80. I reflected this change in the ini file, but not sure if the ping is lookingfor the software on the default port.

wolfiepup
16-Jul-2019, 03:17 PM
Found an error:




-2147220975 : The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

Evertjan Dondergoor
17-Jul-2019, 02:51 AM
You can put those error codes in google. This seems one of the most obvious hits:
https://stackoverflow.com/questions/9157087/getting-error-transport-error-code-was-0x80040217-while-sending-email-in-asp-net

Glancing over this thread it seems to be a gmail security setting.

Bob Cergol
18-Jul-2019, 09:06 AM
The SMTP email settings you defined in your Dynamic AI instance are used by both manual and scheduled sending, so if one works, the other should work. Make sure:


The 'AGENT' user exists in your system.
The password you have assigned to that user matches the one you entered into AGENT.ini
AiAGentPing.exe and AGENT.ini both reside in the same folder


You can manually execute AiAgentPing to make a test and prove if it can successfully send an email. (It's successful receipt is unrelated.) If it is successful you will see it updated the "last" and "next" execution date-time stamps on scheduled records due for sending at the time AiAgentPing was executed. If it fails, an error should be written to the log, that you can view under 'General Alerts' on the Admin menu under Activities, Log Alerts.

Gmail requires authentication and use of SSL -- and the last time I used GMAIL for this I used port 465. Also GMAIL has introduced more stringent security so if you don't allow devices and applications that GMAIL now considers insecure (Outlook on my Win10 machine was an example of this.) you either have to turn this setting off in GMAIL or make an exception in GMAIL. (I don't recall how I did this for Outlook.)

In case you tested manual emails using a local SMTP server, and then changed your SMTP server to use GMAIL in order to do scheduled emails, you needed to define various SMTP parameters in Dynamic AI system parameters. See Dynamic AI System Parameters.pdf that you can find with the other doc files on the "Documentation" link in the sticky post at the very top of this forum with title "Dynamic AI Resources".

Lastly, depending on security rules on a given email server, the email domain of the sender might be required to be the same as email server domain, i.e. email_server@Acme.com might not allow sending an email from RRunner@WileyC.com. In Dynamic AI, the user profile specifies that user's email, which defines the "from" address.

Bob