petrovitch Posted July 11, 2012 Share Posted July 11, 2012 PHP Mailer is sending a copy to the sender also. How do I stop this? Quote Link to comment Share on other sites More sharing options...
Jessica Posted July 11, 2012 Share Posted July 11, 2012 Magic? Post your code. Quote Link to comment Share on other sites More sharing options...
petrovitch Posted July 11, 2012 Author Share Posted July 11, 2012 It's not in the code -- is't something missing. I'm on a Linux server, and it is sending the email correctly BUT IT IS ALSO SENDING A COPY TO THE SENDER. This is a big problem. Please help. All input information is being extracted from files using regex. The input data is correct. $email = new phpmailer(); $email->Host = EMAIL_HOST; $email->Mailer = "smtp"; $email->From = $from; $email->FromName = $sender; $email->AddAddress($to); $email->Subject = $subject; $email->isHTML($isHTML); $email->Body = $htmlBody; $email->AddCC($cc); $email->AddBCC($bcc); $email->AddReplyTo($replyTo); for ($i = 0; $i < sizeof($attachments); $i++) { $email->AddAttachment($attachments[$i]); } $email->SingleTo = true; $email->IsSendmail(); $email->Send(); $email->ClearAddresses(); $email->ClearAttachments(); Quote Link to comment Share on other sites More sharing options...
Tarential Posted July 11, 2012 Share Posted July 11, 2012 Well, I don't actually know what is in these variables but if I had to guess I'd say here is where the copies are being included: $email->AddCC($cc); $email->AddBCC($bcc); Try removing them and see if it still happens? Quote Link to comment Share on other sites More sharing options...
petrovitch Posted July 11, 2012 Author Share Posted July 11, 2012 They are blank. Quote Link to comment Share on other sites More sharing options...
Jessica Posted July 11, 2012 Share Posted July 11, 2012 Then remove them anyway. Have you echo'd the values of $to and $from to make sure they are what you expect? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.