Jump to content

php email sent to gmail is a spam


vivekanandch

Recommended Posts

i am using mail functions in php and i am sending mails but the mails are going to spam in gmail and for yahoo its going to inbox. my problem is i want to send the email to inbox only as most of them use gmail ....should i use any smtp or any other mail library functions?

can anyone guide me?

Link to comment
Share on other sites

The reasons for email ending up in spam are many. In the end, you can exhaust every available option, setting, etc. and still have your email flagged as spam. If it were easy to ensure your email didn't end up in spam, all the spammers would do that.

 

With that said, there are some things you can do to reduce the chance of your email being flagged as spam. I am by no means an expert in this, but I have experienced this with an enterprise class application and had to interface with many teams to resolve. There were several issues encountered.

 

Here are some things you can look into:

 

1. Setting the appropriate headers for the email

2. Avoiding attachments (especially exe)

3. Use an appropriate FROM address. Preferably, the SMTP server you are sending the email from should be the "approved" email server for the domain of that email address. I.e. if you are sending from me@mydomain.com, then the SMTP server should be the approved one to send email for mydomain.com. Some email servers will check incoming email and do a reverse lookup on the from email address and the server that sent the email. Although I doubt this is your problem as I know this isn't the case with gmail

4. Check your content. Make sure it isn't to "brief" and doesn't have all caps, or certain words that may be typical of spam.

 

Also, different email servers use different methods of detecting spam. Part of that process is using "black list" of servers that have been deemed spammers. Even though YOU may not be sending spam another user that uses the same provider as you may have and caused your providers email server to be added to a black list used by one server and not another. This "should

be rare as providers do not want their email servers to be black-listed and will kick users that abuse the system.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.