Ummm I have a site that will be using email newsletters as well, is this going to become a sort of problem?
Last thing I want is to get mail locked for an email newsletter.
Last thing I want is to get mail locked for an email newsletter.
The "Support Requests" forum is now viewable by guests.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menufunction sendMail( $sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID = '', $aPlus = '' )
{
global $site;
if( $iRecipientID )
{
$profileQuery = "SELECT `ID`, `NickName`, `RealName`, `Email`, `Password`, `Status`, `EmailFlag` FROM `Profiles` WHERE `ID` = '" . (int)$iRecipientID . "';";
$aRecipientInfo = db_arr("$profileQuery");
}
$sMailHeader = "From: {$site['title']} <{$site['email_notify']}>";
$sMailParameters = "-f{$site['email_notify']}";
$sMailSubject = str_replace( "<SiteName>", $site['title'], $sMailSubject );
$sMailBody = str_replace( "<SiteName>", $site['title'], $sMailBody );
$sMailBody = str_replace( "<Domain>", $site['url'], $sMailBody );
$sMailBody = str_replace( "<recipientID>", $aRecipientInfo['ID'], $sMailBody );
$sMailBody = str_replace( "<RealName>", ( ( 1 < strlen($aRecipientInfo['RealName'] ) ? $aRecipientInfo['RealName'] : $aRecipientInfo['NickName'] )), $sMailBody );
$sMailBody = str_replace( "<NickName>", $aRecipientInfo['NickName'], $sMailBody );
$sMailBody = str_replace( "<Email>", $aRecipientInfo['Email'], $sMailBody );
$sMailBody = str_replace( "<Password>", $aRecipientInfo['Password'], $sMailBody );
if( is_array($aPlus) )
{
foreach ( $aPlus as $key => $value )
{
$sMailBody = str_replace( '<' . $key . '>', $value, $sMailBody );
}
}
if( 'HTML' == $aRecipientInfo['EmailFlag'])
{
$sMailHeader = "MIME-Version: 1.0\r\n" . "Content-type: text/html; charset=iso-8859-1\r\n" . $sMailHeader;
$iSendingResult = mail( $sRecipientEmail, $sMailSubject, $sMailBody, $sMailHeader, $sMailParameters );
}
else
{
$iSendingResult = mail( $sRecipientEmail, $sMailSubject, html2txt($sMailBody), $sMailHeader, $sMailParameters );
}
return $iSendingResult;
}