3

is there any way i install SMTP service on my Linux server and use php to send emails through it ?

so that emails doesn't show up as spam ?

maybe through ssl ?

my mail() function is perfect , with perfect headers , but still sending to spam :(

Thanks .

Rami Dabain
  • 4,709
  • 12
  • 62
  • 106

3 Answers3

2

Cross-posting myself from another answer:

A few bullet points (Assuming that mail() returns true and there are no errors in the error log) :

  • Does the sender address ("From") belong to a domain on your server? If not, make it so.
  • Is your server on a blacklist (e.g. check IP on spamhaus.org)? This is a remote possibility with shared hosting.
  • Are mails filtered by a spam filter? Open an account with a freemailer that has a spam folder and find out. Also, try sending mail to an address without a spam filter.
  • Do you possibly need the fifth parameter "-f" of mail() to add a sender address? (See mail() command in the PHP manual)
  • If you have access to log files, check those, of course, as suggested above.
  • Do you check the "from:" address for possible bounce mails ("Returned to sender")? You can also set up a separate "errors-to" address.
Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • Answers : 1 - yes 2 - no 3 - no 4 - i will check 5 - no errors related to mail 6 - nothing wrong there – Rami Dabain Nov 15 '10 at 11:26
  • my domains are roomp3.com and okitoo.net , each on a seperated server , i own the okitoo.net dedicated server and has root access to it . – Rami Dabain Nov 15 '10 at 11:30
  • @Ronan strange, sounds okay. Maybe show the headers anyway? Is there any info in the headers *why* the E-Mail got filtered out? Some spam filters add that information. – Pekka Nov 15 '10 at 11:30
1

There are plenty of variables that could potentially be involved here.

Your idea of a perfect header seems subjective. I would recommend you use something like PHPMailer or Swiftmailer to handle your mailing needs.

Some other variables you might need to take into account are the processing of bounced emails, and making sure you send your mail in chunks as opposed to one big send off.

Russell Dias
  • 70,980
  • 5
  • 54
  • 71
0

You can recheck your headers, maybe there might a space or something in the header from address, you can also check if the ip of your server is blacklisted (http://www.anti-abuse.org/multi-rbl-check/)

Joe
  • 610
  • 7
  • 21