Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Cowboy Denny Posted February 6, 2023 Posted February 6, 2023 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.
Randy Calvert Posted February 6, 2023 Posted February 6, 2023 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/
Cowboy Denny Posted February 6, 2023 Author Posted February 6, 2023 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.
Cowboy Denny Posted February 6, 2023 Author Posted February 6, 2023 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?
Marc Posted February 6, 2023 Posted February 6, 2023 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
Solution Cowboy Denny Posted February 6, 2023 Author Solution Posted February 6, 2023 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
Randy Calvert Posted February 6, 2023 Posted February 6, 2023 (edited) 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: Exiting SES sandbox sucks. It took several go arounds with them to get it lifted, but it finally happened. Edited February 6, 2023 by Randy Calvert Cowboy Denny 1
Recommended Posts