[WD22] SMTP email from Amazon server

Startbeitrag von Al am 19.10.2017 02:23

Hello All

I have an Amazon EC2 server and to the best of my knowledge I have correctly setup the SMTP emailing provisions using their SES process to create a valid set of credentials

I know that my smtp process works because it does so on a variety of other servers and local installs and even with Office365 so I assume the problem is in the credentials or maybe the PCSoft SMTP control does not implement a STARTTLS session in a way that Amazon likes although the EmailStartSMTPSession() function works without giving an error.

The EmailStartSession() function gives the following error message

Unable to send message
Check the recipient address as well as your account settings(Sender address)

First Attempt
Last response of SMTP server is:
503 Error: need Mail command

Second Attempt
Timeout
No server response withing timeout - this is 60 seconds

Third Attempt
Content of Email: Sender not recognised by server Transaction denied

The code collects the user data from a file and stores it in variables that are then passed to the functions as:

SWITCH GSMTPSecurityOption
CASE 2 //TLS
EmailStartSMTPSession(GSMTPUserName,GSMTPPassword, GSMTPServerName,GSMTPPortNumber,GSMTPASynch,emailOptionSecuredTLS)

Followed by
EmailSendMessage(GSMTPUserName)



Has anyone managed to get smtp emailing working on an Amazon server and if so what is the secret please ?

Regards
Al

Antworten:

Hello Al,

I haven't tried on amazon, but your code makes me ask the following questions:

1. did you try with OptionSSL instead of TLS (some settings documentations are not always very clear on what is what at that level)?

2. You are saying "... EmailStartSMTPSession() function works without giving an error." but your code does not get the result from the function and does not test for errors.

3. you are then giving us error messages but for the emailstartsession (not smtp), so I'm guessing it's in some other code and not the one shown, and clearly that can't work as this other function does not support secured transmissions.

4. Are you sending in synchronous or ansynchronous mode (the parameter is in a variable)? In Windev, you should be in synchronous always.

5. Are you sure of the port number? I have several times found that the settings doc is incorrect at that level, and an internet search gave me a working one.

Best regards

von Fabrice Harari - am 19.10.2017 08:38
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.