Forum Moderators: coopster

Message Too Old, No Replies

Styling PHP mails

         

Grenz

5:33 pm on Feb 9, 2009 (gmt 0)

10+ Year Member



Hi
I have a PHP form that sends an e-mail when the payment on the site is accepted.
Howeve - I dont have a clue about how to style the mail.
The sending is working just fine by the way.

Its the text "EXAMPLE" that I want to style, and if possible, the backgroundcolor etc.
I have tried to implement a link to my CSS stylesheet and various other thing but everytime I get an error.
Also if I make stuff like "ü" it doenst show "ü" but just "ü"

Can anyone help me?

My PHP:

static public function sendWelcomeMail($username,$password,$mail, $oid = 0, $tt = 0){
$content = " EXAMPLE
Bestell-Nr: $oid
Zahlungs nummer: $tt
";
mail($mail,"text text text",$content, "From: robot@example.com");
}

[edited by: eelixduppy at 7:00 pm (utc) on Feb. 9, 2009]
[edit reason] exemplified [/edit]

PHP_Chimp

7:54 pm on Feb 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want to send an email that you can style then you will need to send an html email.
There are examples of how to send an html mail on the mail [uk2.php.net] page. You can then use as much CSS as you like.