Smart Mailer PHP

December 5, 2003 by Martha Graham

Check out the Smart Mailer extension here at DMXzone.
http://www.dmxzone.com/go?5628

Martha Graham
DMXzone.com

The easiest way...

January 31, 2004 by Kutt Niinepuu
Well, you asked for it. If you just need to send simple e-mails you don't need alla the capabilities of that superb extension.

Basically, you pass the form parameters to a new page, which has the email sendind code in it.

You need to fill the following line with data:
mail ($to, $subject, $message, $headers);
You can replace the variables with $_POST variables directly, but it is easier to manage if you construct the various parts of the message separately.

Start with $subject = "Hello world"; or $subject = $_POST['subject']; (if you can get it from the form field "subject")

Now $to = "your@email.com"; or $to = $_POST['email']; (if you had that field filled in in the form)

Let's take headers now:
$headers = "From: from@email.com\r\n" ;
$headers.= "Reply-To: reply@email.com\r\n" ;
$headers .= "Cc: additional@emails.com\r\n";
$headers .= "Bcc: blind@email.com\r\n";

You can leave out the additional headers like cc or bcc

As to the message:
$message = "Your message, lines terminated by \n" or $message = $_POST['textarea'];

As long as you define the variables before the mail () function, it should work.

Kutt (kutt@fullnet.ee)