Jump to content

Recommended Posts

When sending a mail, the mailer wraps the mail contents. In HTML5 there is a wrap="soft/hard" parameter which seems to do nothing. 

 

I collect a text via form/textarea, where the user may enter line breaks. If I print it, those are kept:

 

echo $myText;

 

produces:

 

This is line 1

This is line 2

 

However if I send it via mail:

 

 

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 
mail($to, $subject, $message, $headers);
 
then my text arrives like this:
 

This is line 1 This is line 2

 

What do I do wrong?

 

 
Link to comment
https://forums.phpfreaks.com/topic/281204-mail-function-forces-wrap/
Share on other sites

the PHPFreaks.com Questions, Comments, & Suggestions forum section, where you posted this -

This is NOT a help forum! Do not post topics asking for help that are not related to the website.

 

 

php help questions belong in the php help forum section. moving thread....

 

 

In HTML5 there is a wrap="soft/hard" parameter which seems to do nothing

 

Ah...no! If you want to create own html email template, you should code it like it's 1995-1996 :)

Coding an html email is basically like you're coding simple web page using old fashioned style.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.