Is your wordpress website hosted on AWS or Lightsail and recently found out that your forms aren’t working? Yep, me too!
The Issue
The main issue of why the forms aren’t working is that AWS Instances and Lightsail do not allow the usual way of sending forms via PHP, so you need a workaround.
The Fix
It took me a while to work out the reason why and I couldn’t find an answer quickly on Google, but having researched a number of plugins I downloaded WP Mail SMTP.
This simple plugin uses SMTP to send a form via an email account, it works with most providers and can even integrate into Google without having to upgrade the premium version of the plugin.
It will also integrate into mail sending systems such as SendInBlue, Mailgun and Sendgrid. But if you have a spare SMTP account that you can use, it’s simple to set up.
Just follow the simple instructions once installing the plugin and it tests the connection at the end. I did have a few issues using an Office 365 account, for some reason it just wouldn’t work.
Issues with your password
One of the other issues I had was with my password, in the end I had to drop a piece of code into the wpconfig file, just copy and paste the below and replace the “your_password” with your actual password.
define( 'WPMS_ON', true );
define( 'WPMS_SMTP_PASS', 'your_password' );
High Number of Emails
If your website receives a high number of emails, the enquiries could get blocked like mine did. I ended up signing up for a SendInBlue account and using their smart relay system to forward emails across.
A free account allows 300 emails per day, but this can be increased by upgrading. It is worth setting up a custom domain to use this service, I will include this in a future post.