Hello.
I've got an email script. The $message is more than 300 characters. I'm not using the wordwrap() function (wordwrap is recommended by the PHP Manual).
The script works fine without using the wordwrap() function. I can apply the wordwrap function and the script works the same (the email looks the same in the email box) as it does without wordwrap.
The PHP Manual, as far as I can tell, does not give a reason for using the wordwrap function.
My email script use the <html> tags. It may be that wordwrap() is not necessary if I use the <html> tags.
How come the PHP Manual says to use the wordwrap function?
The PHP Manual says this:
$message
Message to be sent.
Each line should be separated with a LF (\n). Lines should not be larger than 70 characters.
// The $message is about 300 characters long.
// The href="http://........." part alone is more than 70 characters.
$message = <html><body><p>Regis... <a href="http://........."><click here</a>...";
$message = wordwrap($message, 70);
mail('mail_to@example.com', 'My Subject', $message);
// It's sending mail ok just like this (without wordwrap):
$message = <html><body><p>Regis... <a href="http://........."><click here</a>...";
mail('mail_to@example.com', 'My Subject', $message);
Thanks.