I have a Heroku app which has a php script that send out an email. The email sent always goes to spam.
Let's say the heroku app is mywebsite.herokuapp.com and my email is mywebsite@gmail.com. Based on my research I understand that the problem might be that the email is being sent from my server which is mywebsite.herokuapp.com but the email address is gmail.com.
If I used $mail->Host = 'smtp.gmail.com';
can this be the problem?
Based on my research other problems might be with the SPF or the DKIM
I spent a ton of hours trying to look it up online but everything I found had to do with custom domains and their DNS settings (for a start) which you can't have with a Heroku app.
Any suggestions?
Thanks!
This was the closest that I got to helpful information but it didn't give me enough information to go on.