Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Richard A. Melia
August 18, 2005, 9:06 pm
rate this thread
I am using MIME::Lite to send an e-mail with a file attachment.
Everything works well except for the body of the message.
I am using Type => 'TEXT' and Data => $comment
Where $comment has embedded carriage-returns (\n).
When the message arrives, it is one long string displaying all the \n's that
Can anyone tell me what to do to fix this problem?
Thanks in advance.
Re: [MIME::Lite] not recognizing carriage-returns in body of message
The following fits your description:
$comment1 = "This is a comment.\nIt is intended to appear over 2 lines\n";
$comment2 = 'This is a comment.\nIt is intended to appear over 2 lines\n';
print $comment1, "\n", $comment2, "\n";
The solution in this case is (obviously) to assign in *double* quotes, not
in *single* quotes.