CMSMailer/FormBuilder - getting two e-mails
Posted: Mon Dec 07, 2009 5:46 pm
I'm using the latest versions of CMSMS, CMSMailer and FormBuilder.
I've got a contact form setup using FormBuilder, and it uses CMSMailer to send the message. Everything is working fine, except that I get each e-mail twice. When I send a test message through CMSMailer I only get it once, but I get it twice with the actual contact form. I've tried both "Email Results to Set Address(es)" and "Call a User Defined Tag with Form Results", where I manually send the message w/ the code below.
I've tried using that same code and calling it outside of FormBuilder and I only get the e-mail once. I've also made sure that the code isn't being called twice. I'm only calling Send() once, but I get two messages. I only have one "Email Results..." option set at a time.
I've got a contact form setup using FormBuilder, and it uses CMSMailer to send the message. Everything is working fine, except that I get each e-mail twice. When I send a test message through CMSMailer I only get it once, but I get it twice with the actual contact form. I've tried both "Email Results to Set Address(es)" and "Call a User Defined Tag with Form Results", where I manually send the message w/ the code below.
Code: Select all
$mailer =& $gCms->modules['CMSMailer']['object'];
$mailer->reset();
$mailer->IsHTML(true);
$mailer->AddAddress($staffContact->fields['contact_email'], $staffContact->fields['company_name'] .' '. $staffContact->fields['address']);
$mailer->addReplyTo($params['cntnt01fbrp__3'][0], $params['cntnt01fbrp__2']);
$mailer->SetSubject('Website Contact');
$mailer->SetBody($message);
$mailer->Send();