8

I hope this question wont be too specific. But I really need to ask. We all know that we cannot fully prevent our emails to go to spam box right? But I guess we can decrease the #of emails that goes there.

Till now, I use PHP's built-in function mail() but I guess there are other methods right? What are they and what is your best practice for this prblem?

Also is there a way to sending emails through Google Appspot? Thanks!

makyol
  • 213
  • 8
  • 20
  • Only the best practice is to satisfy proper header and do not send mails frequently otherwise they will go in to spam. That does not effect what library are you using but completely depends on the mail header and mail frequency – Shakti Singh May 13 '11 at 16:16
  • @Shakti That is true, but using a library can already solve most of these problems. – kapa May 13 '11 at 16:18
  • @bazmegakapa: If you are sending an email that looks like spam, what library you use to dispatch it is not relevant. – Lightness Races in Orbit May 13 '11 at 16:19
  • 2
    Basically, create emails that don't look like spam. Don't mention Viagra, don't mention popular spam keywords, don't put in text/html obfuscation, if you have html+text sections, make sure the content matches between the two. beyond that, fire off the mails and hope for the best. – Marc B May 13 '11 at 16:20
  • 3
    @Tomalak If you send spam-looking emails, nothing will prevent those from going into the spam box. And nothing should. A library helps you a lot in setting up the correct headers and handling email sending in a more convenient way. So it at least saves you from not-spam emails ending up in the spam box. – kapa May 13 '11 at 16:22
  • @bazmegakapa: They do not do much with spam but they just provide a layer upon mail() and still you have to provide the true info with those libraries. – Shakti Singh May 13 '11 at 16:25
  • @Shakti They minimalize not-spam emails ending up in spam box that are **caused by the developer's error**. – kapa May 13 '11 at 16:27
  • So your answer to "what is the best practice" is "let somebody else decide the best practice"? Doesn't really answer the question, methinks. – Lightness Races in Orbit May 13 '11 at 16:29
  • @bazmegakapa: And what I said dear, library does not effect much but you have to provide true info(headers) – Shakti Singh May 13 '11 at 16:30
  • @Shakti And if you don't have enough experience in how to provide the right headers, a library will help you a lot because it guides you through this and sets them for you. If you think it does not help, please give the OP which headers he should set, the possible caveats and best practices :). – kapa May 13 '11 at 16:33
  • @bazmegakapa: You should be agree because a library can not help with spam. He have to provide proper header which is already there http://php.net/manual/en/function.mail.php – Shakti Singh May 13 '11 at 16:37
  • @Shakti And after every argument, it says `Subject must satisfy » RFC 2047.` or something like that. Been there, done that, read all the specs, tried out a lot of things. In the end, I found that a library makes this much easier. Again: It is easy to get caught by a spam filter, just because of formal mistakes. – kapa May 14 '11 at 10:01

2 Answers2

4

A hosted service may be a better way to go. They've developed procedures, and relationships with ISPs, that will help get your e-mails delivered and will help you fend off spam complaints.

I have a mailing list for a blog that I run, and I decided not to send out an e-mail that had an (otherwise legitimate) story that dealt with a pharmacy. I figured almost nobody would get the e-mail, and that I'd get a lot of spam complaints, just because of the word "pharmacy."

Provide useful information in your e-mails first and foremost. Use double opt-in procedures. That will reduce the probability of your e-mail being sent to spam.

John
  • 15,990
  • 10
  • 70
  • 110
2

I am using Swiftmailer.

If you read the docs and follow guidelines, you will have much less mails landing in the spam folder. I have used it with great success. It also has some useful plugins.

kapa
  • 77,694
  • 21
  • 158
  • 175