Author Topic: Problems sending via Amazon SES  (Read 6333 times)

Offline Neil.E.

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Problems sending via Amazon SES
« on: July 30, 2020, 05:29:46 AM »
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?



Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Problems sending via Amazon SES
« Reply #1 on: July 30, 2020, 08:44:49 AM »
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

Offline Neil.E.

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Problems sending via Amazon SES
« Reply #2 on: July 30, 2020, 06:50:55 PM »
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!



Offline Neil.E.

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Problems sending via Amazon SES
« Reply #3 on: July 30, 2020, 06:54:59 PM »
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!

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5772
  • Karma: +274/-2
    • View Profile
Re: Problems sending via Amazon SES
« Reply #4 on: July 31, 2020, 02:08:44 AM »

Offline Neil.E.

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Problems sending via Amazon SES
« Reply #5 on: July 31, 2020, 02:28:30 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.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Problems sending via Amazon SES
« Reply #6 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?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Neil.E.

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Problems sending via Amazon SES
« Reply #7 on: January 21, 2021, 05:15:05 PM »
I couldn't get it working with AWS.
In the end I used ssl://smtp.gmail.com on SMTP port 465

did you solved a problem?
Did you tried a to connect directly to port via telnet, etc?

 

Powered by SMFPacks Social Login Mod