php mail() send emails into spam/junk folder

the mail() function

Moderators: egami, macek, gesf

Post Reply
dnsahoo
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Jul 16, 2017 9:58 pm

Mon Jul 17, 2017 1:30 am

Hi,

I am getting email into my Spam/Junk folder. I have a domain called mynewdomain.com and I am sending email from myname@domain2.com to myname@domain2.com inside this domain using php mail().
Here domain names are different (mynewdomain.com & domain2.com ).

I am not using any smtp to send email.

Please guide, how to avoid emails into spam. It should goes to Inbox.

Thank you.

User avatar
hyper
php-forum Active User
php-forum Active User
Posts: 380
Joined: Mon Feb 22, 2016 5:52 pm

Mon Jul 17, 2017 8:48 am

You are supposed to use the domain name (that it is sent from) as the sender of an email, using a different domain / sender is one of the things spammers do to try and stop themselves getting banned or pretending to be someone they're not.

dnsahoo
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Jul 16, 2017 9:58 pm

Wed Jul 19, 2017 9:14 pm

Hi,

Thanks for your replay. I have tried with PHPMailer with SMTP, still receiving email into Spam.

Please suggest any way, my email should not deliver into spam/junk.

Thank You,

Hirsty
New php-forum User
New php-forum User
Posts: 16
Joined: Tue Jul 18, 2017 1:28 pm

Fri Jul 21, 2017 6:42 am

Hello dnsahoo

I have found SwiftMail to help also. Please not it can take quite a bit to get your emails into someones inbox, you need to gain its trust

1. make sure your ip is not ona DNSBL blacklist - mxtoolbox comes in handy for checking this
2. Add DKIM and SPF records to your domain - this will let the receiving end know that the email is coming from you
3. If this is a html email, supply a plain text alternative
4. Check your email with SpamAssassin. If yuour email containins high amounts of money, lots of images, lots of capital letters or anything out of the ordinary, it is likely SpamAssasin could flag it
5. Denote what mailing system your email is coming from using headers - email delivery is all about trust

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest