2

I am using PHP Mailer to send invoices to my clients. Some clients have adressed the problem that my mails land in their spam folders (I cannot disprove it). I read several articles and posts here and tried to orient my settings according to How do you make sure email you send programmatically is not automatically marked as spam?.

Since there are a lot more suggestions, of which I am not sure about, I want to check on what I am currently deploying and what actually makes sense.

What I checked:

  • I use mostly plain text, very less html (just <p>) and no css
  • The IP adress of the mail server matches the adress of my domain
  • I am on no blacklist (looked it up on several pages referenced in high-voted posts here)
  • I always send emails from the domain of my website, no other domain shows up in any parts of the mail (like reply to etc.)

What I did not check / What I'm not sure about:

  • Authentication methods, such as SPF or DKIM. As a not advanced user concerning programming emails I do not know how to set these things up - is it still advisable/acceptable operating without?
  • I only use my main-domain for sending my e-mails rather than an additional email domain. Some suggested to use this extra email domain in case I lose reputation. Is it recommended to use extra email domains for this?
  • Is it possible to check if my mails actually land in the spam folder e.g. with the PHP Mailer or do I need third party email services (like "Mailgun")?
  • I do not always have the full name for the To Field, is it still advisable to add the last name (without first name) to the email adress?

My PHP Mailer lines (do I use everything that is recommended?):

require_once('../PHPMailer/class.phpmailer.php');
iconv_set_encoding("internal_encoding", "UTF-8");
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->isSMTP();                             
$mail->Host = 'xxx';  
$mail->SMTPAuth = true;                          
$mail->Username = 'xxx';                
$mail->Password = 'xxx';                        
$mail->SMTPSecure = 'tls';                           
$mail->Port = 25;

$mail->setFrom('xxx', 'Potatoe');
$mail->addAddress('xxx', 'AnotherPotatoe');   
$mail->addReplyTo('xxx', 'xxx');
$mail->addCC('xxx');

$mail->addAttachment('/xxx/xxx.pdf');         
$mail->isHTML(true);                              

$mail->Subject = 'xxx';
$mail->Body    = 'xxx';
$mail->AltBody = 'xxx';
Franky2207
  • 163
  • 2
  • 19
  • 1
    https://stackoverflow.com/questions/371/how-do-you-make-sure-email-you-send-programmatically-is-not-automatically-marked – Tajgeer Jul 18 '17 at 09:00
  • Please check AWS SES or the MailGun if possible. – Rohit Dalal Jul 18 '17 at 09:00
  • do these services also provide the function to send a great amount of emails with individual attachments (e.g. in my case for the invoices)? The services I looked into only are mostly for newsletters, that's why I ask – Franky2207 Jul 18 '17 at 09:15

1 Answers1

0

I would heavily recommend either adding SPF and DKIM or use a 3rd party mail service that can do it for you.

Those mechanisms encrypt your message and prove you own the domain to mail services. It will also block anyone pretending send mail as you.

BookOfGreg
  • 3,550
  • 2
  • 42
  • 56
  • do these services also provide the function to send bigger amounts of emails with individual attachments (e.g. in my case for invoices)? Do you know a "convenient" way to get to learn adding SPF or DKIM to my mails (or do I need advanced developer skills for this)? – Franky2207 Jul 18 '17 at 09:16
  • Mailgun, Amazon SES, Campaign Monitor are all mail services for various prices, they should all support attachments and Campaign Monitor at least I know does allow a lot of bulk and you can even see the click/bounce rates of your emails. SPF and DKIM should be googleable, most of it is in the DNS with some email server config. https://mandrill.zendesk.com/hc/en-us/articles/205582267-About-SPF-and-DKIM#set-up-spf-and-dkim-for-your-sending-domains – BookOfGreg Jul 18 '17 at 09:47