Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EMAIL PHP HELP URGENTLY!!!!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Dear All,

I need help in Php send mail, I got no problem runing this script but I am using flash with this script. My problem was I can wrap the text in the flash message box but when I sent out and recieved in outlook express or any webbased email, the message appears as a single line... Is frustrating reading a long single line email.


Anyone out there, please help me because I need to repair this as to hand up my project, thanks a million!!!!!!!!!


Anyone got solution please send an email to me.

Eddieson
eddieson@possiblemind.com


The script I used, please tell me what to include in:

<?

/* subject */

$subject = &quot;Enquiries&quot;;





/* additional header pieces for errors, From cc's, bcc's, etc */

$headers = &quot;From: $name <$email>\n&quot;;

$headers .= &quot;X-Sender: <$email>\n&quot;;

$headers .= &quot;X-Mailer: PHP\n&quot;; // mailer

$headers .= &quot;X-Priority: 1\n&quot;; // Urgent message!

$headers .= &quot;Return-Path: $name <$email>\n&quot;; // Return path for errors





/* recipients */

$recipient = &quot;enquiry@XXXXX.com&quot;;





/* message */

$message = $pesan;




/* and now mail it */

mail($recipient, $subject, $message, $headers);





// Replay

// ---------------------------





/* subject */

$subject = &quot;XXXXX autoreply&quot;;





/* additional header pieces for errors, From cc's, bcc's, etc */

$headers = &quot;From: Possible Mind < enquiry@XXXXX.com>\n&quot;;

$headers .= &quot;X-Sender: < enquiry@XXXXX.com>\n&quot;;

$headers .= &quot;X-Mailer: PHP\n&quot;; // mailer

$headers .= &quot;X-Priority: 1\n&quot;; // Urgent message!

$headers .= &quot;Return-Path: Possible Mind < enquiry@XXXXX.com>\n&quot;; // Return path for errors





/* recipients */

$recipient = $email;





/* message */

$message = &quot;

Dear $name,





Thank you for your feedback, we will reply as soon as possible





Regards,





XXXXXX






mail($recipient, $subject, $message, $headers);

?>
 
Hi sleipnir214,

Thanks, I had tried that and nl2br() both not working...
any other ways???


Thanks alot,

Eddieson
 
I don't know what's in your message body, so I can't exactly advise you.

If the message is one long text string, then nl2br() won't work by itself. There's only one newline in the string -- at the end.

Have you tried nl2br(wordwrap())? ______________________________________________________________________
TANSTAAFL!
 
Hi sleipnir214,

I got it!!! It works!! thanks a million!!!

I used:

wordwrap( $text, 88, &quot;\n&quot;, 1);

echo &quot;$newtext\n&quot;;


You are great!!!!

Eddieson


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top