1

Simple PHP mail script that works

From the Apache forums:

I’m posting this message for the benefit of other newbies like me.

Thanks to CHASE’s advice, I now have a very simple mail script that works:

<?php
$to = $_REQUEST['MyEmail'] ;
$subject = $_REQUEST['subject'] ;
$greeting = $_REQUEST['greeting'] ;
$realname = $_REQUEST['realname'] ;
$HisEmail = $_REQUEST['HisEmail'] ;
$message = $_REQUEST['message'] ;
$headers = “From: $HisEmail”;
$send = mail($to, $subject, $greeting.”\n”.”\n”.$realname.”\n”.”\n”.$HisEmail.”\n”.”\n”.$message, $headers);
?>

In the BODY of the email that I receive, the script shows the person’s greeting (e.g., Ms.), name, email address, and the comments that he/she made.

As I improve the script, I’ll post the results for the benefit of other newbies like me. Suggestions are, of course, welcome.  :-)

– Dr. T.

One Response so far.

  1. Ahsan says:

    thanks alot for the script above. helped alot

Leave a Reply





Server Management | Web Hosting | Quality Web Hosting Services | Best Web Hosts | Web Hosting Services Reviews | Hosting Reviews
© Chase Ideas. All Rights Reserved.
Apache is a mark of the ASF (Apache Software Foundation) and the Apache Web Server, other related products, s/w and codebases mentioned are ASF licensed.
Apache.com and All Networked Sites are not affiliated with, or endorsed by, the ASF in any way.