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
, \r, and 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?
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
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
, but I’m not positive.
You do not need to put any other headers in it for many webhosts… It really depends on what the webhost has it set as…
Usually webhosts require you to put the From: header… but that is not always the case.