Class Registration |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
. |
is_valid) {
$department = 'diane@awjohnson.com';
require_once('Rmail/Rmail.php');
$mail = new Rmail();
/**
* Set the from address of the email
*/
$mail->setFrom( $_POST['company'] . ' <'. $_POST['email'] .'>');
/**
* Set the subject of the email
*/
$mail->setSubject('Class Registration');
/**
* Set high priority for the email. This can also be:
* high/normal/low/1/3/5
*/
$mail->setPriority('normal');
/**
* Set the text of the Email
*/
$mail->setText('Date of class: ' . $_POST['date'] . '
Company Name: ' . $_POST['company'] . '
Address:
' . $_POST['street'] . '
' . $_POST['city'] . '
Phone Number: ' . $_POST['phone'] . '
Email: ' . $_POST['email'] . '
Contact: ' . $_POST['contact'] . '
CA Contractors License Number: ' . $_POST['contractors'] . '
Students Attending:
1. ' . $_POST['name1'] . '
2. ' . $_POST['name2'] . '
3. ' . $_POST['name3'] . '
4. ' . $_POST['name4'] . '
5. ' . $_POST['name5'] . '
6. ' . $_POST['name6'] . '
7. ' . $_POST['name7'] . '
8. ' . $_POST['name8'] . '
9. ' . $_POST['name9'] . '
10. ' . $_POST['name10'] . '
IP. ' . $_SERVER['REMOTE_ADDR']);
/**
* Set the HTML of the email. Any embedded images will be automatically found as long as you have added them
* using addEmbeddedImage() as below.
*/
$mail->setHTML('Date of class: ' . $_POST['date'] . '
Company Name: ' . $_POST['company'] . '
Address:
' . $_POST['street'] . '
' . $_POST['city'] . '
Phone Number: ' . $_POST['phone'] . '
Email: ' . $_POST['email'] . '
Contact: ' . $_POST['contact'] . '
CA Contractors License Number: ' . $_POST['contractors'] . '
Students Attending:
1. ' . $_POST['name1'] . '
2. ' . $_POST['name2'] . '
3. ' . $_POST['name3'] . '
4. ' . $_POST['name4'] . '
5. ' . $_POST['name5'] . '
6. ' . $_POST['name6'] . '
7. ' . $_POST['name7'] . '
8. ' . $_POST['name8'] . '
9. ' . $_POST['name9'] . '
10. ' . $_POST['name10'] . '
IP. ' . $_SERVER['REMOTE_ADDR']);
/**
* Set the delivery receipt of the email. This should be an email address that the receipt should be sent to.
* You are NOT guaranteed to receive this receipt - it is dependent on the receiver.
*/
//$mail->setReceipt('');
/**
* Add an embedded image. The path is the file path to the image.
*/
//$mail->addEmbeddedImage(new fileEmbeddedImage(''));
/**
* Add an attachment to the email.
*/
//$mail->addAttachment(new fileAttachment(''));
/**
* Send the email. Pass the method an array of recipients.
*/
$address = $department;
$result = $mail->send(array($address));
$success_register = 1;
}
}
?>
Class Registration |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
. |