Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Issue with Email class

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 927 Views
  • J2-Paul
    Avatar
    Community Member
    51 Posts

    Issue with Email class Link to this post

    I am not getting the CC an BCC emails sent with the Email class.

    The commented code did not work, so I tried the setCc and setBcc methods.

    No Dice.

    No errors are generated and I receive the "to " email. The email address are valid and tested.

    Any ideas anyone? Sure it something obvious!

          $from= $this->Emailfrom;
          $to= $this->Emailto;
    //      $cc= $this->Emailcc;
    //      $bcc= $this->Emailbcc;
          $subject= $this->Subject ;

          $body='';
          
          $email = new Email($from, $to, $subject, $cc, $bcc);
          $email->setCc($this->Emailcc);
          $email->setBcc($this->Emailbcc);
          $email->ss_template = 'rsvp_conf';
          $email->populateTemplate($data);
          $email->send();

    927 Views
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.