Page 1 of 1

Refine cmsmailer to reduce spam

Posted: Sat Aug 25, 2012 9:36 pm
by swarfega
I am currently using this udt to send news to an email address:
$gCms = cmsms(); //global $gCms;
$editedby = $gCms->variables['***'];
$bodytext = 'On ' . date('j-M-Y', $params['start_time']) . ' a new message was posted on http://www.thriplow.org.uk News page.<br><br>

Note: If there is any mention of included attachments in the message, please view them on the website.<hr>
<h2> ' . $params['title'] . '</h2>
<br />' . $params['summary'] . '<br /><br />
'. $params['content'].'<br clear="right"><br>';
$cmsmailer =& cms_utils::get_module('CMSMailer');
$cmsmailer->SetFrom('****');
$cmsmailer->SetFromName('****');
$cmsmailer->AddAddress('****', $name='****');
$cmsmailer->SetBody($bodytext);
$cmsmailer->IsHTML(true);
$cmsmailer->SetSubject('Website News: ' . $params['title']);
$cmsmailer->Send();
Currently if there is a summary and a detail in the news post the email shows both. Id like it to only show the summary if there is one and likewise with detail.