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.

Archive /

Our old forums are still available as a read-only archive.

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

Email bcc's to sender?


Reply


2 Posts   1911 Views

Avatar
StuM

Community Member, 56 Posts

18 September 2008 at 12:21pm

Edited: 18/09/2008 12:32pm

Hi All,

I've just built emailing into my SS app, and there seems to be something strange going on with the emails. It sends OK, but the email address I have placed in the from field also receives a copy. I've got the same application on 2 servers, 1 testing and 1 production, and it's doing the same from both. I also tried sending an email through a basic php script using the same addresses, and this behaviour doesn't occur in that case.

Have I missed something?

The application I'm building will be sending hundreds or even thousands of emails a day and we're not wanting them all sent back to us as well, any ideas?

here's the source code if it helps:

public function sendEmail($ID)
   {
      $sub = DataObject::get_by_id('RegistrationSubmission', $ID);
      if ($sub)
      {
         $email = new Email_Template();
         $email->to = $sub->Email;
         $email->from = GFConst::email_from_name . '<' . GFConst::email_from . '>';
         $email->subject = GFConst::submission_subject;
         $email->ss_template = GFConst::submission_template;
         $email->populateTemplate($sub);
         $email->send();
      }
   }

Avatar
StuM

Community Member, 56 Posts

19 September 2008 at 7:59am

Anybody? Is this a bug or the way it's supposed to work, if the former, how can I fix it, if the latter, how can I disable it?