SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Correct way to send email from a webserver

    Hey Sitepoint,

    What are the steps I need to take to ensure that emails sent from my webserver will arrive in a users inbox? Is there a check list I can through ex, headers, proper email address, clean IP address, from address, to address, reply-to address, message body under a certain size, message body lacking spammy words etc?
    Last edited by wh33t; Sep 23, 2012 at 21:49. Reason: changed topic

  2. #2
    Founder of Primal Skill Ltd. feketegy's Avatar
    Join Date
    Aug 2006
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also make sure you authenticate your mails with a domain key (DKIM). More info here: http://www.dkim.org/
    The biggest no no is using a different domain in the 'from' address then the server from which the email is sent. It will instantly be marked as spam.

    On the other hand, use Google mail server to handle your emails, and use SwiftMailer for sending emails from PHP. It's the best tool you can find.

  3. #3
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by feketegy View Post
    Also make sure you authenticate your mails with a domain key (DKIM). More info here: http://www.dkim.org/
    The biggest no no is using a different domain in the 'from' address then the server from which the email is sent. It will instantly be marked as spam.

    On the other hand, use Google mail server to handle your emails, and use SwiftMailer for sending emails from PHP. It's the best tool you can find.
    Thank you. I'm not too familiar with Google mail server or SwiftMailer I will look into them immediately. Would you be able to elaborate on what kind of headers are required to send a properly formed email?

  4. #4
    Founder of Primal Skill Ltd. feketegy's Avatar
    Join Date
    Aug 2006
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wh33t View Post
    Thank you. I'm not too familiar with Google mail server or SwiftMailer I will look into them immediately. Would you be able to elaborate on what kind of headers are required to send a properly formed email?
    If you use SwiftMailer it will handle it for you.

  5. #5
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by feketegy View Post
    If you use SwiftMailer it will handle it for you.
    Chaching! Thank you.

  6. #6
    SitePoint Guru bronze trophy
    Join Date
    Dec 2003
    Location
    Poland
    Posts
    925
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    1. Set up a mailbox account on your server that you will use to send the emails from.

    2. Use Swiftmailer or PHPMailer package - configure it to send emails via SMTP of your mailbox account.

  7. #7
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Lemon Juice View Post
    1. Set up a mailbox account on your server that you will use to send the emails from.

    2. Use Swiftmailer or PHPMailer package - configure it to send emails via SMTP of your mailbox account.
    Awesome I've got it working now Thanks for your help guys.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •