Exemplo n.º 1
0
             }
         }
         flush();
     }
     print "    Sending mail to {$to} ...";
 }
 if (isset($_POST['chk_smtp']) && $_POST['chk_smtp'] == 'external') {
     $smtpMailer->setMailSubject($subject);
     if ($unsubLinkFlag === false) {
         if ($contenttype == 'plain') {
             $smtpMailer->setMailType('plain');
         } else {
             $smtpMailer->setMailType('html');
             $message = stripslashes($message);
         }
         $smtpMailer->setMailBody($message);
         $attachmentArray = array();
         if (is_uploaded_file($fileatt)) {
             $file = fopen($fileatt, 'rb');
             $data = fread($file, filesize($fileatt));
             $attachmentArray['data'] = $data;
             $attachmentArray['type'] = $fileatt_type;
             $attachmentArray['name'] = $fileatt_name;
         }
         if ($smtpMailer->sendEmails($to, $attachmentArray) === true) {
             print '<font color="#0000FF"> ... Successfull!</font><br>';
         } else {
             print '<font color="#FF0000"> ... Aborted!</font><br>';
         }
     }
 } else {