Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Personalized Email UserForms

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 737 Views
  • ragunalth
    Community Member
    14 Posts

    Personalized Email UserForms Link to this post

    To send personalized emails using user form add the following code to append to the body.

    foreach($emailData['Fields'] as $Field)
    $body = preg_replace('#\b'.$Field->Name.'(|\b)#u', $Field->Value, $body);

    Add the relevant text field in the body of the email under email recipients. Example

    Hi EditableTextField2
    Thanks for sending me an email.
    Kind Regards


    Hi Paul
    Thanks for sending me an email.
    Kind Regards

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.