This tutorial deals with issues sending mail from your site such as notifications, contact us submissions, etc.
Recommended Mail Delivery Method
These days, using server mail is highly discouraged as it can cause your entire server IP to get blacklisted by ISP's if your users mark things as spam and we have seen this happen. Sometimes, a user will forget that they joined the site, or they will forget to change their notification settings. Then, when they get mail, they just mark it as spam as it's faster than logging in and changing their settings or contacting you to remove them from the site. When that happens, their ISP will block your IP in their blacklist. These lists can get into various anti-spam sites such as project honeypot, stopforumspam, etc. When your server IP is blacklisted, it is a very long process to get it unblocked and off the blacklist. As such, you face having issues with your site not being accessible by users whose ISP's use the blacklists to protect their clients from spam. This is a bad situation to be in as your site now cannot get users on it. Moving hosts is normally no an answer either as they can also check the blacklists and most hosts today will not put up with spamming sites.
We recommend using a mail service such as Mandrill, Sendgrid, etc for your transactional mail. As we already have tutorials for setting up Mandrill which includes how to add an unsubscribe link, we won't delve into how to set that up.
Troubleshooting Article for Mail Issues
This article for Problems with the Mail has some great tips and suggestions. It was written for V2 but most of the things in it are great tips.
Set a Redirect on Registration
One issue mentioned above is with users marking things as spam because they didn't set their privacy notification settings and are getting too much mail. Our suggestion is to set a redirect for registration so that once a user registers, they are automatically redirected to their privacy settings and can set them before doing anything else on the site.
- Go to Settings and click Registration.
- Find "Redirect After SignUp" and in the box enter user/privacy and hit Enter.
That will redirect the user to the privacy settings and hopefully, most of them will take the time to set the settings.
Mail is going to spam
There are several things that can cause your site emails to end up in the user's spam box. Here are a couple of the main issues seen:
- Due to how a phrase is worded, some clients have been putting something other than the site email in the "From" setting found in AdminCP >> Settings >> Mail Server. You need to put your site email address in there as this is used to show what email this came from. The phrase makes it sound like you need to put a site name in there but it will end up in spam if you do that.
- Using server mail for mail delivery. We recommend a mail service as mentioned above as they are more reliable in delivery.