DeveloperSide.NET Forums
August 03, 2020, 08:59:08 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: Email script  (Read 18505 times)
0 Members and 1 Guest are viewing this topic.
Posts: 3

View Profile
« on: July 19, 2009, 08:53:51 AM »


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.

Master of All Subjects
Posts: 3272

View Profile WWW Email
« Reply #1 on: July 19, 2009, 11:07:27 AM »

Additional Headers Section:

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

Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!