newbie - custom mail form question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jramaro
Forum Commoner
Posts: 58
Joined: Tue Jun 26, 2007 7:46 am

newbie - custom mail form question

Post by jramaro »

hi ,
Im wanting to have a custom mail form
I know how to make regular email forms but this is different.

Its an invoice mail I'd like to send ( i know i should go through Gnupg which i will after I learn to make it )
I would like to make email that has an invoice look / feel , in the message body.
I already have the variables existing on the page in sessions.
Can you point me in direction of something that explains this?

I can get a mail to go through using hidden input text fields, but it cramps them all in one messy line.
Instead I'd like it to show something along the lines of :

Order:
Items:
Options:
Subtotals:
Shippings:
Totals:
Submitted on (Date) from (ip)

something like that.

Thanks
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Post by ianhull »

You need to be sendning html emails with html headers.

you can then use html to format the layout of the email.


http://www.php.net/mail
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

ianhull wrote:You need to be sendning html emails with html headers.

you can then use html to format the layout of the email.


http://www.php.net/mail
This is incorrect, you need to make use of the newline character \r\n (or \n in windows environment) which will can also be represented as the PHP_EOL constant
Last edited by John Cartwright on Tue Jul 17, 2007 3:43 pm, edited 1 time in total.
jramaro
Forum Commoner
Posts: 58
Joined: Tue Jun 26, 2007 7:46 am

RE: html headers

Post by jramaro »

Thanks for responses,
Important for anybody making email form, "/n" doesnt work .
it mass bulks all the lines together.

He's right , use "/r/n"
dont forget to concatenate variables

works great
thanks
Post Reply