Sending a plain-text e-mail through PHP is a simple process

PHP:
  1. mail ($to, $subject, $message, $headers);

The $to parameter can look like:

example@mysite.com
example@mysite.com, user@mysite.com
Example Sr <example@mysite.com>, Example Jr <user@mysite.com>

Common headers to use in your messages:

PHP:
  1. $headers =  "From: yourname@yoursite.com\r\n
  2.              Reply-To: replyhere@yoursite.com\r\n
  3.              Cc: watcher@yoursite.com\r\n
  4.              Bcc: spy@yoursite.com\r\n
  5.              X-Mailer: YourApplicationNameHere\r\n"

Share
Share →

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>