DeveloperSide.NET Forums

DeveloperSide.NET => Web.Developer Server Suite Community Edition,
Public Support Forum => Topic started by: DrT on July 19, 2009, 08:53:51 AM



Title: Email script
Post by: DrT on July 19, 2009, 08:53:51 AM
Hi!

I am writing a PHP script for emailing the results of a form. The script is based on a variety of scripts found on the Web.

The following section was found in one of the scripts. In this section, the script sends an email to the individual that filled the form.

$headers = "From: no_reply at ... ";
$subject = "Thank you for contacting us";
$autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www  … ";

$send = mail($from, $subject, $autoreply, $headers);

The $from is a variable passed from the form (i.e., the recipient’s email address). The $subject and $autoreply are self-explanatory.

I assume the $headers is my email address, which is defined above.

My question is:  What is the word “From” that is included in the definition of $headers? Does that mean to place the value “no_reply at …“ in the From line like one would do in a regular email?

Thank you.

Dr. T.



Title: Re: Email script
Post by: admin on July 19, 2009, 11:07:27 AM
Additional Headers Section:
http://us2.php.net/manual/en/function.mail.php

It's for containing the "from", "cc", "bcc", etc, lines/info of the email.