2011-08-12 22:18:20
Sending html emails
Hi. I have version 2.0 installed and I'm trying to figure out how to send an html email.
I'm working on a modification that uses the "ATutorMailer" function and I'm trying to send this email in html format.
The code snippet is...
[php]
if ($parent_row = mysql_fetch_assoc($parent_result)) {
$mail = new ATutorMailer();
$mail->From = 'LIVE Online Math';
$mail->AddAddress($parent_row['email']);
if ($thr == 0) {
// The enrollment has expired; send the enrollment notification
$mail->Subject = SITE_NAME . ' - ' . _AT('vbc_email_unenrolled_subject');
if ($row['status'] == VBC_ENROLLMENT_STATUS_TRIAL) {
$mail->Body = _AT('vbc_email_unenrolled_message_trial', SITE_NAME, get_display_name($row['member_id']), AT_print($system_courses[$row['course_id']]['title'], 'courses.title'));
} else {
$mail->Body = _AT('vbc_email_unenrolled_message', SITE_NAME, get_display_name($row['member_id']), AT_print($system_courses[$row['course_id']]['title'], 'courses.title'));
}
} else {
// It's a reminder
$mail->Subject = SITE_NAME . ' - ' . _AT('vbc_email_reminder_subject');
$mail->Body = _AT($vbc_reminders[$thr], SITE_NAME, get_display_name($row['member_id']), AT_print($system_courses[$row['course_id']]['title'], 'courses.title'));
}
$mail->Send();
}
[/php]
In viewing the email message sources that are coming currently, I see: Content-Type: text/plain; charset="utf-8"
Thanks and please advise.