11004 Posts in 2735 Topics by 1824 members
|Go to End|
24 June 2009 at 8:48am
When a user subscribes to the newsletter they receive an email but the email is not using the SubscribeEmail.ss template. They were receiving no emails until i selected the "Send copy of submission to this address" checkbox under the Form tab of my Subscribe Form page. I think I am just missing the proper place to tell SS to send out the subscribe email and instead it using the "Send copy of submission to this address" option. Anyone had this problem. Thanks
27 June 2009 at 7:20am
I have the same problem, and am still looking for a solution. Apparently it uses the generic email template in the user defined forms module...
27 June 2009 at 8:02am
So, the following code in SubscribeForm.php should send the right email (as you've probably already seen), but for some reason it doesn't do it:
$templateData = array(
'Email' => $member->Email,
'FirstName' => $member->FirstName,
'Newsletters' => new DataObjectSet( $newsletters ),
'UnsubscribeLink' => Director::baseURL() . 'unsubscribe/index/' . $member->Email
$email = new SubscribeForm_SubscribeEmail();
$email->setFrom( Email::getAdminEmail() );
$email->setSubject( $this->Subject );
$email->populateTemplate( $templateData );
27 June 2009 at 10:37pm Last edited: 27 June 2009 10:37pm
Spent all day debugging this problem, but no worky. Nobody has this problem, really?
28 June 2009 at 9:36pm
Ha! Solved it. Totally overlooked it, but it didn't set the To field. There's actually a patch too:
Should have looked in trac. Will do so more in the future ;)
Hope this helps you too, potion_maker.
|Go to Top|