0

Hi Can anyone tell me how to have the email that is received from a form on a website formatted so it looks nicer.


Here is the code that generates what i see in the received email. i just want to make some lines bold and in red and on moved down a line. especially the line that reads " Type of cakes required are"

i'll be grateful for any pointers

$message="name: = ".$name."
My email address is: = ".$email."
My contact number: ".$contactnumber."
Number of guests: = ".$Numberofguests."
Date cakes required are
day : = ".$day."
month: = ".$month."
year: = ".$year."
Type of cakes required are
Cupcakes: = ".$Cupcakes."
Mini cupcakes: = ".$Minicupcakes."
Mixed cupcakes: = = ".$Mixedcupcakes."
Occasion cakes: = ".$Occasioncakes."
Cupcake tower: = ".$Cupcaketower."
Is a cupcake tower required?
Yes to topcake: = ".$Yestotopcake."
No topcake: = ".$Notopcake."
Not sure: = ".$Notsure."
Collection or delivery
I will collect: = ".$Iwillcollect."
Quote delivery: = ".$Quotedelivery."
Quote Delivery and setup: = ".$QuoteDeliveryandsetup."
Not sure yet: = ".$Notsureyet."
Delivery post code area: = ".$Deliverypostcodearea."
Wedding style: = ".$Weddingstyle."
Enquiry: = ".$Enquiry."
";
2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by cereal
1

If you need bold and colors, then you have to use HTML e-mail. There's an example on the mail() page, look at #example 4: http://php.net/manual/en/function.mail.php

There are some tips to apply CSS and make them work on mail clients, like inline CSS instead of using external or style element. Search on google for html email css.

bye!

Edited by cereal: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.