unset($parts[1]['Content-Type']);
}
$mime->setTXTBody($parts[2]);
+ $this->textbody = $parts[2];
$mime->setHTMLBody($htmlbody);
+
// var_dump($mime);exit;
foreach($this->images as $cid=>$cdata) {
if(preg_match('/text\/html/', $header['Content-Type'])){
$mime->setHTMLBody($parts[2]);
$mime->setTXTBody('This message is in HTML only');
+ $this->textbody = 'This message is in HTML only';
}else{
$mime->setTXTBody($parts[2]);
+ $this->textbody = $parts[2];
$mime->setHTMLBody('<PRE>'.htmlspecialchars($parts[2]).'</PRE>');
}
}
}
$oe = error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
+ if ($this->debug) {
+ print_r(array(
+ 'rcpts' => $rcpts,
+ 'email' => $email
+ ));
+ }
$ret = $mail->send($rcpts,$email['headers'],$email['body']);
error_reporting($oe);
if ($ret === true) {
function mapurl($in)
{
-
- foreach($this->urlmap as $o=>$n) {
+ foreach($this->urlmap as $o=>$n) {
if (strpos($in,$o) === 0) {
$ret =$n . substr($in,strlen($o));
$this->log("mapURL in $in = $ret");