Page 1 of 1

strange mail behavior ??

Posted: Tue Oct 14, 2003 3:38 pm
by ecourt
$message = "hi.\r\n";
$message .= "hi \r\n";
$message .= "hi \r\n";
$message .= "hi \r\n";
$message .= "hi \r\n";
$message .= "hi \r\n";

when I sent this ---

mail ($to,$subj,$message,$header)

in the email, I get :

hi hi hi hi hi hi

and I wanted

hi
hi
hi
hi
hi
hi


Why are my \r\n's not working ??

Thanks!

Posted: Tue Oct 14, 2003 3:48 pm
by Gen-ik
Try using \n\r (not \r\n) or just \n

Posted: Tue Oct 14, 2003 3:54 pm
by twigletmac
heredoc format might also help:

Code: Select all

$message =<<<END

hi
hi
hi
hi
hi
hi 
END;
Mac

Posted: Tue Oct 14, 2003 3:57 pm
by ecourt
I figured it out, I had a header set for text/html.

When I changed it to text, it worked perfectly!

Thanks!!

Posted: Tue Oct 14, 2003 4:03 pm
by ecourt
one more mail question --

is there a way to send a message to multiple users, but each user can only see their name (like a BCC) ??

Thanks!