Drupal Mail Help

Wyze1 - March 28, 2008 - 08:12

Hi Guys

Im trying to get this going
function tester_submission() {
$type = $_POST['type'];
$to = $_POST['to'];
$from = $_POST['from'];
$message= $_POST['message'];
if ($type == null | $to == null | $from == null | $message == null){
return t("Error Sending Message");
}
else{
drupal_mail('tester','tester_submission', $to, language_default(), $params, $from);
return t("Your Submission Has Been Sent.");
}

}
How do I set the messages body and subject! to equal $type and message?

Hi Guys Im basically trying

Wyze1 - March 28, 2008 - 10:39

Hi Guys

Im basically trying to send a mail with the following variables

$subject = $_POST['type'];
$to = $_POST['to'];
$from = $_POST['from'];
$body = $_POST['message'];

when I try to do this:

drupal_mail('tester','tester_submission', $to, $subject, $from , body, $from);

It sends the mail except the body and subject is blank. Please help ...

Thanks

In Open Source I Trust! Everybody Else Must Pay Cash!

 
 

Drupal is a registered trademark of Dries Buytaert.