Jump to content

AWS hosted send mail issue


Go to solution Solved by Cowboy Denny,

Recommended Posts

Since I moved my site to AWS Lightsail cpanel/whm instance I can not send mail using PHP or SMTP but I have had luck sending using sendgrid until it comes to password resets (lost password).

When the user gets an email it is getting this url4620.domain.com added in front of the domain name.  I thought it might have something to do with tracking on send grid but I confirmed no tracking is turned on.

My preference is to use SMTP or PHP but I know lots of issues sending mail from AWS hosted servers so I'm okay using send grid but need the lost password to send a valid Link in the email.

Any help is appreciated.

Link to comment
Share on other sites

2 hours ago, Randy Calvert said:

AWS does not allow their servers to run SMTP directly.  You would want to setup outbound SMTP through SES. 

In further looking…. There might be a way to remove the restriction on the port. 


https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/

What if sending secure (port 465) instead of non-secure (25), Does AWS block that as well?  I'm guessing they do but would like to know for sure.  That's how it's configured and not working.

Link to comment
Share on other sites

I am attempting at using SES as recommended as a solution and added the SMTP settings but when I try and send email from the server using the SES SMTP settings and using the from address as a verified email address in SES I'm getting the following error when trying to send a test email

IPS\Email\Outgoing\Exception: The SMTP server returned an unexpected response code: (0)

Any ideas?

Link to comment
Share on other sites

  • Solution
2 hours ago, Marc Stridgen said:

The links on sendgrid are link tracking being enabled. You would need to switch that off which would correct the problem.

With regard the SMTP issues, you would need to contact your SMTP provider to correct those

Thanks Marc for the reply.

tracking has been disabled on sendgrid but the URL links are still present with some odd urlxxx in front of my domain.  I don't have that dns record defined so its going to fail.  I messed with it for the day and gave up knowing that sendgrid isn't going to work for me for lost passwords since the link must be specific to allow a user to reset there password.

I got email to work by getting AWS SES (Simple Email Service) to work using TLS and port 567 with the AWS supplied smtp server, user and credentials.  Now just trying to get out of sandbox mode so I don't have to confirm every recipient.

Thanks but this can be closed..  I solve it myself but appreciate the suggestions

Link to comment
Share on other sites

Cowboy Denny, glad you got it squared away!  🙂 

I meant to share a screenshot of SMTP settings for SES since I use it also, but got distracted by something else...  for anyone that finds this later that is looking for it:

Could contain: Page, Text

Exiting SES sandbox sucks.  It took several go arounds with them to get it lifted, but it finally happened.  

Edited by Randy Calvert
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...