Set Custom Header #2725
Unanswered
FuckingToasters
asked this question in
Q&A
Replies: 1 comment 3 replies
-
For the most part you don't need to because PHPMailer will generate all those standard headers automatically. Also the syntax you were previously using makes little sense: it will generate a corrupt header, and it's also vulnerable to header injection attack. If you do want to add additional custom headers (though don't duplicate auto-generated ones; that will not go well), your first stop (as for any library) should be the docs. Simple example:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I never worked with PHP before and got a code which use mail() function. I now want to upgrade it to use phpmailer and found that it use following code to send mails using the mail() function:
I now need to convert this to phpmailer code and created following code so far:
As you might have noticed already, in the mail function a $header is passed. I'm unsure how i can pass this header using phpmailer. Would be nice to hear back soon.
Regards,
FuckingToasters
Beta Was this translation helpful? Give feedback.
All reactions