Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Problems sending via Amazon SES

Started by Neil.E., July 30, 2020, 05:29:46 AM

Previous topic - Next topic

Neil.E.

I am using Amazon SES to send emails from AbanteCart running on an Amazon Lightsail instance.
In System / Settings / Mail I have:

Mail Protocol: SMTP
SMTP Host: tls://email-smtp.us-east-1.amazonaws.com
SMTP User Name and Password as per Amazon SES
SMTP Port: 587
SMTP Timeout: 10


I get errors trying to send emails, and am not sure what I am doing wrong.

I have tried the host name with and without "tls" at the front but it doesn't make any difference.

When I try to send an email, I get errors as per the attached log

Would someone please help me resolve this?



abolabo

are you sure in port number?
Usually 587 port used for incoming emails.
Please try change to 465 and let us know
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Neil.E.

Thanks so much for your quick reply.

When I change port 587 to 465, I get this error instead:

2020-07-30 22:46:12 - Error: STARTTLS not accepted from server!
2020-07-30 22:46:14 - Error: Password not accepted from server!
2020-07-30 22:46:14 - Error: MAIL FROM not accepted from server!
2020-07-30 22:46:15 - Error: RCPT TO not accepted from server!
2020-07-30 22:46:15 - Error: DATA not accepted from server!
2020-07-30 22:46:15 - Error: DATA not accepted from server!
2020-07-30 22:46:15 - Error: QUIT not accepted from server!
2020-07-30 22:46:15 - App Error:  AbanteCart core v.1.2.16 AMail Errors: Error: STARTTLS not accepted from server!
Error: Password not accepted from server!
Error: MAIL FROM not accepted from server!
Error: RCPT TO not accepted from server!
Error: DATA not accepted from server!
Error: DATA not accepted from server!
Error: QUIT not accepted from server!



Neil.E.

After changing port to 465, if I change tls://hostname to ssl://hostname I get this error instead:

2020-07-30 22:52:38 - Error: Password not accepted from server!
2020-07-30 22:52:38 - Error: MAIL FROM not accepted from server!
2020-07-30 22:52:38 - Error: RCPT TO not accepted from server!
2020-07-30 22:52:38 - Error: DATA not accepted from server!
2020-07-30 22:52:39 - Error: DATA not accepted from server!
2020-07-30 22:52:39 - Error: QUIT not accepted from server!
2020-07-30 22:52:39 - App Error:  AbanteCart core v.1.2.16 AMail Errors: Error: Password not accepted from server!
Error: MAIL FROM not accepted from server!
Error: RCPT TO not accepted from server!
Error: DATA not accepted from server!
Error: DATA not accepted from server!
Error: QUIT not accepted from server!


Neil.E.

Quote from: Basara on July 31, 2020, 02:08:44 AM
Hello.

Try SMTP endpoint url without protocol


Thanks for the suggestion.  I have already tried this but gave it another go with no success.

The error says:
2020-07-31 6:20:05 - warning:  AbanteCart core v.1.2.16 fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in <b>/opt/bitnami/apps/MYSITE.COM/htdocs/core/lib/mail.php</b> on line <b>376</b>
2020-07-31 6:20:05 - warning:  AbanteCart core v.1.2.16 fsockopen(): unable to connect to ses-smtp-user.20200731-100119:465 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in <b>/opt/bitnami/apps/MYSITE.COM/htdocs/core/lib/mail.php</b> on line <b>376</b>


I dug into the code, and  ultimately the host name gets passed to fsockopen().  The php docs for that function say:

hostname

    If OpenSSL support is installed, you may prefix the hostname with either ssl:// or tls:// to use an SSL or TLS client connection over TCP/IP to connect to the remote host.


I do have OpenSSL installed.

I got impatient and got the email working with gmail's server, so am happy to cut my losses and use that server instead.  If you'd like more input to try to get AWS SES working, I am happy to persevere to help resolve the issue.

abolabo

did you solved a problem?
Did you tried a to connect directly to port via telnet, etc?
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Neil.E.

I couldn't get it working with AWS.
In the end I used ssl://smtp.gmail.com on SMTP port 465

Quote from: abolabo on January 21, 2021, 06:35:11 AM
did you solved a problem?
Did you tried a to connect directly to port via telnet, etc?

Forum Rules Code of conduct
AbanteCart.com 2010 -