php mail and multiple css classes do not work?

hackrockx

New Member
I can't seem to get multiple css classes working with php's mail, I've gotten inline styles to work just fine but when I try to associate classes with elements it's a no go.. Yes, I know there are other options that are probably better than php's mail.Yes, the classes are local and not from an external style sheet.Only 1 class will show up out of the two specified and it's always the first one.If I put class="class1 class2" class1 shows, if I put class="class2 class1" class 2 shows.What's going on?Here is my test mail.\[code\]$msg = ' <html> <head> <style type="text/css"> .class1{background-color:red;} .class2{color:blue;} </style> </head> <body> <div class="class2 class1">this is a test</div> </body> </html>'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; @mail($to, $sub, $msg, $headers);\[/code\]
 
Top