Page 1 of 1

TLS Mail Setup for Amazon SES [SOLVED]

Posted: Tue Dec 31, 2013 10:34 pm
by sml
I would like to use Amazon Simple Email Service (AWS SES).

Based on this thread, it appears that using TLS is the best connection method ....
https://github.com/opencart/opencart/issues/897

However I was unable to edit the mail.php as suggested in the post. The files were different to the version that I am using with 1.5.5.1 CE.

The current output error using TLS is ...
2013-12-31 14:18:21 - PHP Notice: Error: STARTTLS not accepted from server! in /home/xxxxxx/public_html/system/library/mail.php on line 181

Where should I start?

Re: TLS Mail Setup for Amazon SES

Posted: Wed Jan 01, 2014 5:54 pm
by sml
Solved ....

As per the usual huge number of extensions required to turn OpenCart into a decent e-commerce solution, another new extension is required to get this working!

http://www.opencart.com/index.php?route ... on_id=3932

OR

https://bitbucket.org/spotonsolutions/o ... /wiki/Home

1. Install the extension above.
2. Go to the usual Admin -> Settings -> Mail
3. Enter the following:
Mail Protocol: SMTP
Mail Parameters: nothing required here
SMTP Host: email-smtp.us-east-1.amazonaws.com
SMTP Username: AKIBJ7N5PRJQ5ZBG5SPA (as per your username)
SMTP Password: AngzjLywAg4TAC++9HqzHLyzx/gma3mNgjqod1BiwBeL (as per your password)
SMTP Port: 587
SMTP Timeout: 5

Done!

So I think this further extension, now raises my total of installed extensions to well over 25+ extensions! Magento requires about 4 or 5 for the same functionality.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Fri Jan 03, 2014 1:28 pm
by butte

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Fri Jan 03, 2014 3:16 pm
by sml
Your link is irrelevant. I know how SES works, but there is a bug in OpenCart not permitting the SMTP TLS authentication. Solved by steps above.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Sat Jan 04, 2014 6:16 am
by butte
The link is not irrelevant, it crosslinks to the original thread on the same thing, Mar. 24, where what you started Dec. 31 above might as well have been added. Don't be shocked if a Moderator opts to merge the two threads.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Sat Mar 15, 2014 7:16 am
by milezteg
This should be merged into core asap. Why wouldn't OC support secure email out of the box? It's an e-commerce engine!

Works 100% on my testing and production environment with Amazon SES. Opencart v1.5.4.1 (production) Latest build (Dev)

mail() is weak and PHPmailer is just a better solution IMO. THis saved me :)

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Fri Mar 21, 2014 11:28 pm
by JIMSLITA
Thanks again sml - got ours up and running, including getting out of the sandbox phase and getting production access within 24Hrs.

Others may find that they have to use a different port (amazon ses suggested 3 alternatives to us when we created our smtp credentials and the 587 caused an error first time for us - we are using 465)

We have come off the back of paying YMLP.com a fairly considerable amount of money to send out to our mailing list of 9000 and amazon are charging us 0,10$cts per thousand :joker:

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Thu Jul 03, 2014 12:22 am
by rifrafwebagency
just for future reference, in case anyone will have the same issue, you can use amazon without any additional addon.

you can prefix the host with "ssl://", so if your amazon domain is "email-smtp.eu-west-1.amazonaws.com" use "ssl://email-smtp.eu-west-1.amazonaws.com" as hostname, port 465 and the credentials provided by amazon, obviously.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Sat Jul 12, 2014 7:33 am
by sml
It was a few months ago but pretty sure I tried that without success.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Thu Apr 09, 2015 4:43 pm
by badboybackagain
This will work 200%...i bet....
1. Install the extension above.
2. Go to the usual Admin -> Settings -> Mail
3. Enter the following:
Mail Protocol: SMTP
Mail Parameters: nothing required here
SMTP Host: email-smtp.us-east-1.amazonaws.com
SMTP Username: AKIBJ7N5PRJQ5ZBG5SPA (as per your username)
SMTP Password: AngzjLywAg4TAC++9HqzHLyzx/gma3mNgjqod1BiwBeL (as per your password)
SMTP Port: 587
SMTP Timeout: 5

Make sure that you add the admin email id (which is used to send the email from OC) as the verified sender in Amazon AWS....

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Tue Apr 05, 2016 6:28 am
by phpjunkie
badboybackagain wrote:This will work 200%...i bet....
1. Install the extension above.
2. Go to the usual Admin -> Settings -> Mail
3. Enter the following:
Mail Protocol: SMTP
Mail Parameters: nothing required here
SMTP Host: email-smtp.us-east-1.amazonaws.com
SMTP Username: AKIBJ7N5PRJQ5ZBG5SPA (as per your username)
SMTP Password: AngzjLywAg4TAC++9HqzHLyzx/gma3mNgjqod1BiwBeL (as per your password)
SMTP Port: 587
SMTP Timeout: 5

Make sure that you add the admin email id (which is used to send the email from OC) as the verified sender in Amazon AWS....
Hello all,

Sorry to post to an old thread, but I came across this thread when trying to find a way to use my AWS SES with Opencart for sending of all internal mail. I'm on Opencart 1.5.6.4, and currently use SMTP through one of my Google Apps accounts (gmail) -- and this works perfectly fine for right now.

The reason I'm looking to make a change is because using the Gmail SMTP is restricted to 500 outgoing messages per day, and our AWS (SES) account allows up to 50,000 messages per day currently.

I have SES fully setup for both our main outgoing email address, and our full domain -- and currently use SES successfully through Sendy -- https://sendy.co/

So I 100% do know that our AWS and SES settings are correct. Can be verified here for both email and domain:

Domain: http://i.imgur.com/JWl3A0r.png
Email address: http://i.imgur.com/Nle9V8f.png

Taking the advice from sml & badboybackagain , I installed OCphpmailer (http://bit.ly/1Ma7yf8), and then configured Mail settings in my Opencart admin for my SES credentials.

I then went to my Opencart Contact Form, and attempted to send a message. The message does appear to send, as I am reaching the "Success" page. However, the mail never arrives.

On the flip side of this, when I attempted to simply enter my SES settings into the Opencart Admin (without having OCphpmailer in place), the Contact page would simply time out to a white page and I would never reach the "Success" page.

So for now I reverted back to Gmail SMTP, but would love to get this working. And for an additional bit of information, I have already tried to following:

Tried BOTH variations of email-smtp.us-east-1.amazonaws.com , and ssl://email-smtp.us-east-1.amazonaws.com (and yes, this is the suggested SMTP server as per my AWS dashboard).

Also tried both ports 587 and 465. Same result with all variations -- reaching the Success page on my Contact Us form, but never receiving the actual message.

Any possible suggestions to get this working??

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Sat Nov 26, 2016 2:34 pm
by iamstevenelson
Is there anyone found the solution for phpjunkie's comment above? me too facing exactly the same.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Fri Apr 07, 2017 9:09 am
by iiimriii
I don't think this is solved I am using oc 2 and tried many variations but can't seem to find the solutions. I would appreicate some help.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Wed Jun 26, 2019 10:55 pm
by hexogon
I am also struggling with finding a working solution for this.
SMTP email for AWS SES in OpenCart 3.0.3.2
I also would appreciate some help.

Re: TLS Mail Setup for Amazon SES [SOLVED]

Posted: Wed Jan 20, 2021 8:13 pm
by garbinmarcelo
Hi, were you able to solve this problem? Did OpenCart work with AWS SES? If so, how? Thanks p.s.: v3.0.3.1 (Brasil 1.2.4)