Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Issue with Email class


Go to End


1407 Views

Avatar
J2-Paul

Community Member, 51 Posts

12 June 2010 at 12:00pm

Edited: 12/06/2010 12:01pm

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();