Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
0 down vote
favorite
i use phpmailer , but i have a problem with the addCustomHeader function it always give a bounce .this is the code that i used in :

PHP
$headers = rtrim($_POST['customHeader']);
$PHPMailer->addCustomHeader($headers);


and this is the header that i used in the my textarea field :

PHP
From: test<"my from maile here">
MIME-Version: 1.0 
Content-type:text/html;charset=iso-8859-1
Reply-To: "the reply mail"
X-Mailer: PHP phpversion()

please help me .

What I have tried:

PHP
From: test<"my from maile here">
MIME-Version: 1.0 
Content-type:text/html;charset=iso-8859-1
Reply-To: "the reply mail"
X-Mailer: PHP phpversion()
Posted
Updated 7-May-16 16:14pm

1 solution

what does $headers contain here ?

Quote:
$headers = rtrim($_POST['customHeader']);


I would have thought the usage of addCustomHeader was (as per the documentation PHPMailer[^])

$PHPMailer->addCustomHeader($headers, value);


you dont look like you're supplying a value - also see here php - Can I add custom Message-ID and In-Reply-To header using phpmailer? - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900