|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
return line commands in PHP
I could use some help. I am using the mail() function to send an email in a "helpdesk" like program. I have the person's name and email address attach to the message, however I want to put a few blank lines in between. I used the \n, \r, and \t commands in between them, but they don't do anything.
Another thing I need help with is that the mail function allows you to put other headers in. Do I need to enter anything in those? |
|
#2
|
|||||
|
|||||
|
Re: return line commands in PHP
If it was an HTML e-mail you could just toss in a couple <br>'s...
|
|
#3
|
|||||
|
|||||
|
Re: return line commands in PHP
No, it's not necessary to add any other headers to mail(). There are some you may want, such as the From, Reply-To, Content-Type, MIME-Version, To, CC, BCC. It should work just fine with none, though. Using \n in the body should also work unless you've specified a different Content-Type (like HTML, which doesn't care about new-lines). If you're checking it on a Windows client, you may need to use \r\n, but I'm not positive.
|
|
#4
|
|||||
|
|||||
|
Re: return line commands in PHP
99% sure on this.. if you use single quotes 'text\ntest'.. the new line doesn't happen. you need to use double quotes "text\ntest" instead.
jack |
|
#5
|
|||||
|
|||||
|
Re: return line commands in PHP
Quote:
Usually webhosts require you to put the From: header.... but that is not always the case. |
|
#6
|
|||
|
|||
|
Re: return line commands in PHP
I believe the standard requires \r\n between header lines. At least that's what I use for my PHP mails and it works great...
|
|
#7
|
||||
|
||||
|
Re: return line commands in PHP
Quote:
I feel like I'm reading a mystery novel but can't find the last chapter. |
|
#8
|
|||
|
|||
|
Re: return line commands in PHP
|
|
#9
|
||||
|
||||
|
Re: return line commands in PHP
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| openFIRST PHP 5 Compatibility | Timothy D. Ginn | FIRST-related Organizations | 0 | 30-07-2004 13:45 |
| Sprockets and Roller Chain Models | Madison | Inventor | 3 | 04-02-2003 11:51 |
| iParts on firstcadlibrary.com | Ed Sparks | Inventor | 3 | 08-01-2003 23:30 |
| emulationFIRST v0.04 | Matt Leese | Programming | 7 | 09-07-2002 08:54 |
| What's better, PERL/cgi or PHP/my_sql? | mikefrei | Programming | 10 | 27-05-2002 22:50 |