Help - Search - Members - Calendar
Full Version: Mail Function
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
mathew edison
Ok I get the basics of the mail function in PHP right I just got one questions; where could I place the email that it is send from, is it in the header section?

<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

Taking the example above would the From: statement in the header be put inside the email itself or would it be placed together with the subject?
mathew edison
Thx, I already thought of that and I could have either tested it out for myself or I could have asked here, so I picked the easiest one ofcourse hunter.gif wacko.gif blink.gif I'm off to write my mail script now smile.gif Thx again biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.