Refine cmsmailer to reduce spam

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Refine cmsmailer to reduce spam

Post 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.
Post Reply

Return to “The Lounge”