Jump to content

PHPMailer AddBCC not working


vincper

Recommended Posts

Hey, when i try to send a mail (HTML) with PHPMailer to a Hotmail account it works fine. Problem is that i need to add 2 or more AddAddresses, cuz else it will be seen as Junkmail by hotmail.

Example - This code works fine:

<?php
$mail = new PHPMailer();
       
        $mail->IsSMTP(); // telling the class to use SMTP
        $mail->Host = "localhost"; // SMTP server
        $mail->From = "[email protected]";
        $mail->FromName = "Testmailtjes";
        $mail->AddAddress("[email protected]", "Cmdr Chakotay");
        $mail->AddAddress("[email protected]", "Cmdr Chakotay S");            //removing this will not work
        $mail->AddReplyTo("[email protected]", "Testmailtjes");
        $mail->Subject = "first mailing";
        $mail->Body = "Hier gewoon wat test-tekst";
        $mail->WordWrap = 250;
       
        if(!$mail->Send()) {
            //alles goed
        } else
            //oeps
        }
?>

So when i remove
$mail->AddAddress("[email protected]", "Cmdr Chakotay S");
Hotmail says it is junkmail.

AddBCC doesnt work because i need at least 2 AddAddresses. This is a very weird problem, couldnt find anything about it on google, can anyone plz help me?
Link to comment
https://forums.phpfreaks.com/topic/26146-phpmailer-addbcc-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.