Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <? php
- [-- cut --]
- // Setup SMTP
- //
- $mdb_mail = new PHPMailer(true);
- $mdb_mail->IsSMTP();
- $mdb_mail->SMTPAuth = $mdb_config['smtp_auth'];
- $mdb_mail->Host = $mdb_config['smtp_host'];
- $mdb_mail->Username = $mdb_config['smtp_user'];
- $mdb_mail->Password = $mdb_config['smtp_pass'];
- $mdb_mail->SetFrom($from_email, $from_name);
- $mdb_mail->AddReplyTo($reply_to, $from_name);
- if (!$debug && !$mdb_config['debug_mode']) {
- $mdb_mail->AddAddress($to_email, $to_name);
- if (isset($options['cc'])) {
- $cc_list = explode(',', $options['cc']);
- foreach ($cc_list as $cc) {
- $mdb_mail->AddCC(trim($cc));
- }
- }
- if (isset($options['bcc'])) {
- $bcc_list = explode(',', $options['bcc']);
- foreach ($bcc_list as $bcc) {
- $mdb_mail->AddBCC(trim($bcc));
- }
- }
- } elseif (isset($mdb_config['organization_debug_email']))
- $mdb_mail->AddAddress($mdb_config['organization_debug_email'], 'Debug');
- else
- return false;
- $mdb_mail->Subject = $subject;
- $mdb_mail->IsHTML(true);
- $mdb_mail->Body = $html_mail;
- $mdb_mail->SetWordWrap();
- $mdb_mail->AltBody = $plain_mail;
- // Inline Images
- $mdb_mail->AddEmbeddedImage($mdb_config['email_images'].$header,'header', $header);
- $mdb_mail->AddEmbeddedImage($mdb_config['email_images'].$footer,'footer', $footer);
- $inline_image_array =
- array( 'header' => $mdb_config['email_images'].$header,
- 'footer' => $mdb_config['email_images'].$footer );
- // Attachments
- if (isset($options['attachments'])) {
- $attachments_array = explode(':', $options['attachments']);
- foreach ($attachments_array as $attachment) {
- $mdb_mail->AddAttachment(trim($attachment));
- }
- }
- $mdb_mail->Send();
- [-- cut --]
- ?>
Advertisement
Add Comment
Please, Sign In to add comment