Beispiel #1
0
                 if ($_SESSION['attach_array'][$i]->disposition == 'attachment') {
                     $mail->AddAttachment($tmp_file, imap_qprint($_SESSION['attach_array'][$i]->file_name), 'base64', $_SESSION['attach_array'][$i]->file_mime);
                 } else {
                     $mail->AddEmbeddedImage($tmp_file, $_SESSION['attach_array'][$i]->content_id, imap_qprint($_SESSION['attach_array'][$i]->file_name), 'base64', $_SESSION['attach_array'][$i]->file_mime);
                 }
             }
         }
     }
 }
 if ($mailing_group_id > 0) {
     $feedback = '';
     $tp->get_contacts_from_mailing_group($mailing_group_id);
     while ($tp->next_record()) {
         $mail->ClearAllRecipients();
         //add the body
         $content = $tp->replace_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 />';
         }
     }
     $tp->get_companies_from_mailing_group($mailing_group_id);
     while ($tp->next_record()) {
         $mail->ClearAllRecipients();
Beispiel #2
0
    echo '<input type="hidden" name="contact_id" value="' . $contact_id . '" />';
    echo '<input type="hidden" name="company_id" value="' . $company_id . '" />';
    echo '<input type="hidden" name="template_id" />';
    echo '<input type="hidden" name="mailing_group_id" value="' . $mailing_group_id . '" />';
    echo '<input type="hidden" name="sendaction" value="load_template" />';
    //get the addressbook language file
    echo '<table border="0" width="100%"><tr><td align="center">';
    require $GO_LANGUAGE->get_language_file('addressbook');
    $tabtable = new tabtable('templates_tab', $ab_templates, '600', '400');
    $tabtable->print_head();
    echo '<table border="0" cellpadding="10" cellspacing="0"><tr><td>';
    echo $ab_select_template;
    echo '<table border="0" cellpadding="2">';
    echo '<tr><td><a class="normal" href="javascript:document.forms[0].template_id.value=\'0\';document.forms[0].submit();">' . $ab_no_template . '</a></td></tr>';
    while ($tp->next_record()) {
        echo '<tr><td><a class="normal" href="javascript:document.forms[0].template_id.value=\'' . $tp->f('id') . '\';document.forms[0].submit();">' . $tp->f('name') . '</a></td></tr>';
    }
    echo '</table></td></tr></table>';
    echo '<br />';
    $button = new button($cmdClose, "javascript:window.close()");
    $tabtable->print_foot();
    echo '</td></tr></table>';
    echo '</form>';
} else {
    if ($content_type == 'text/HTML') {
        if ($fs_module = $GO_MODULES->get_module('filesystem')) {
            if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $fs_module['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $fs_module['acl_write'])) {
                $htmlarea->add_button('go_image', 'OBM images', $GO_CONFIG->control_url . '/htmlarea/images/obm_images.gif', 'false', "function insertGOimage()\r\n\t    {\r\n\t    popup('select_image.php','600','400');\r\n\t    }");
            }
        }
    }