Syndicate content
> PHP Mail Form Script Tutorial : Additional Header Info

PHP Mail Form Script Tutorial : Additional Header Info

Intro
Additional Header Info
An Example Free Script
Sending...


Additional Header Info

The most common additional header info I often add is who the email is from:

"From: me@myemailaddress.com "

Usually I add the info to variables first like this:

Code:
$mailto = ?to@email.com?;

$subject = ?Subject line text?;

$message = ?This is my message text \n
This is another line\n
And this is another.?;

$header = "From: me@myemailaddress.com";

Then call the mail function:

Code:
@mail($mailto, $subject, $message)

Notice that the @ symbol suppresses any errors. It is easy to do our own error checking, as the function returns true when successful and false when not.


Sean Buscay
www.christian-web-masters.comSean Buscay is on a mission to CREATE, ADVANCE, and EXPOUND faith in JESUS using web technology. He is the owner of Christian-Web-Masters.com .

Christian-Web-Masters.com newsletter

Stay informed on our latest news!