I am having trouble with a valid email address with an apostrophe as the $to parameter. I don’t know how to pass a parameter with an apostrophe to the PHP mail() function.
I am having trouble with a valid email address with an apostrophe as the
Share
Wrap the email address in double quotes. But are you sure about the apostrophe being valid?
Edit, yup, it’s legal. Just wrap it in double quotes, but also add backslashes in front of double quotes, spaces, and backslash.