Could not connect to the database.");
if($tmprow=mysql_fetch_array($tmpresult))
{
$mailmsg=stripslashes($tmprow["text"]);
$mailmsg=undo_htmlspecialchars($mailmsg);
$mailmsg_html=stripslashes($tmprow["text"]);
}
else
{
$mailmsg = $l_munsubscriptionconfirmmail;
$mailmsg_html = $l_munsubscriptionconfirmmail_html;
}
$mailmsg = str_replace("{catname}",$catname,$mailmsg);
$mailmsg = str_replace("{sitename}",$sitename,$mailmsg);
$mailmsg = str_replace("{confirmurl}",$confirmurl,$mailmsg);
$mailmsg.= "\n\n---\n$defsignature\n\n\n";
$mailmsg = str_replace("\n",$crlf,$mailmsg);
$mailmsg_html = str_replace("{catname}",$catname,$mailmsg_html);
$mailmsg_html = str_replace("{sitename}",$sitename,$mailmsg_html);
$mailmsg_html = str_replace("{confirmurl}",$confirmurl,$mailmsg_html);
$mailmsg_html.= "\n\n \n$defsignature\n\n\n";
$mailmsg_html = str_replace("\n"," ".$crlf,$mailmsg_html);
$mailmsg_html = undo_htmlspecialchars($mailmsg_html);
$subject = $l_unsubscriptionconfirmsubject;
$subject = str_replace("{sitename}",$sitename,$subject);
if($simpnewsmailname)
$fromadr="\"$simpnewsmailname\" <$simpnewsmail>";
else
$fromadr=$simpnewsmail;
$mail = new htmlMimeMail();
$mail->setCrlf($crlf);
$mail->setTextWrap($mailmaxlinelength);
$mail->setTextCharset($contentcharset);
if($myrow["emailtype"]==0)
{
$mail->setHTMLCharset($contentcharset);
$mail->setHTML($mailmsg_html,$mailmsg);
}
else
{
$mail->setText($mailmsg);
}
$mail->setSubject($subject);
$mail->setFrom($fromadr);
$receiver=array();
array_push($receiver,$myrow["email"]);
if(!$insafemode)
@set_time_limit($msendlimit);
if($use_smtpmail)
{
$mail->setSMTPParams($smtpserver,$smtpport,NULL,$smtpauth,$smtpuser,$smtppasswd);
$sendresult=$mail->send($receiver, "smtp");
}
else
$sendresult=$mail->send($receiver, "mail");
do_emaillog($sendresult,$myrow["email"],"unsubscribe newsletter (nlmaint)");
}
}
$redirect=1;
include_once('./includes/head.inc');
?>
|