Example #1
0
         $mail->Body = $html_mail_head . $content . $html_mail_foot;
         $h2t =& new html2text($content);
         $mail->AltBody = $h2t->get_text();
     } else {
         $mail->Body = $content;
     }
     $mail->AddAddress($tp->f('email'));
     if (!$mail->Send()) {
         $feedback .= $tp->f('email') . ': ' . $mail->ErrorInfo . '<br />';
     }
 }
 $tp->get_companies_from_mailing_group($mailing_group_id);
 while ($tp->next_record()) {
     $mail->ClearAllRecipients();
     //add the body
     $content = $tp->replace_company_data_fields($mail_body, $tp->f('id'));
     if ($html_message) {
         $mail->Body = $html_mail_head . $content . $html_mail_foot;
         $h2t =& new html2text($content);
         $mail->AltBody = $h2t->get_text();
     } else {
         $mail->Body = $content;
     }
     $mail->AddAddress($tp->f('email'));
     if (!$mail->Send()) {
         $feedback .= $tp->f('email') . ': ' . $mail->ErrorInfo . '<br />';
     }
 }
 if ($feedback != '') {
     $feedback = '<p class="Error">' . $feedback . '</p>';
 } else {