Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
349 views
in Q2A Core by
Hi

I want to use Amazon SES and MajlGun as:

Send email via SMTP instead of local mail SMTP server address.

But get this errors all the time.

SMTP Error: Could not authenticate.

SMTP Error: Could not connect to SMTP host. Failed to connect to server.

So I installed WordPress on the same server as test and used this plugin,

https://wordpress.org/plugins/fluent-smtp/

https://github.com/WPManageNinja/fluent-smtp/tree/master/app/Services/Mailer/Providers/AmazonSes

And it's work on the same credentials.  But the plugin take's care of port and SSL/TLS settings. For that I can't copy.

What I'm missing here.

Ali
Q2A version: https://github.com/pupi1985/question2answer/tree/bugfix-pupi1985
by
i followed this guide:
https://docs.aws.amazon.com/ses/latest/dg/send-using-smtp-programmatically.html

i got an Email sent to my inbox.

But i can't figure out the "Send email via SMTP instead of local mail " settings

1 Answer

+1 vote
by
edited by
 
Best answer

This Worked for me: ( Get your data from your control panel )

Amazon SES

SMTP server address: email-smtp.us-east-1.amazonaws.com
SMTP server port:  2587 
SMTP secure connection:  TLS
SMTP username: AKIAZQ*************
SMTP password: BGKHceL**********

Must notice at Amazon-SES SMTP username is not IAM username

see this

MailGun

SMTP server address: smtp.eu.mailgun.org
SMTP server port:  2525
SMTP secure connection:  TLS
SMTP username: user@My_Domain.LTD
SMTP password: pass****************


I am on shared hosting and some ports are closed like port 25

So to lookup open ports, if you get terminal access

try this command $ curl -vv telnet://URL:Port

$ curl -vv telnet://email-smtp.us-east-1.amazonaws.com:25

if port close:

curl: (7) Failed to connect to email-smtp.us-east-1.amazonaws.com port 25: Connection refused

if port open:

*   Trying 50.16.75.168:25...
* Connected to email-smtp.us-east-1.amazonaws.com (50.16.75.168) port 25 (#0)

Or you can contact your hosting support and share with them the name and docs link of the service you want to work on, so the support can tell you which ports are open or open ports for you.

...