paradrenaline Posted February 8, 2007 Share Posted February 8, 2007 I apologize if this is not the correct place to post, I couldn't find any place related to flash. My problem is this. I have created a flash form handled by PHP. When I send mail I would like for some words of a variable to be displayed in bold or underlined in the e-mail. Example of a variable inside my php file $body = "Dear someone,\n\n"; $body .= "[bOLD]Personal Information\n"; //How can I make only this part of the variable appear bold in the e-mail? $body .= "Some more text after that"; After much research am I correct in thinking that there are no bold or underline tags in PHP. Do I have to incorporate HTML into this in order to get the desired effect? If so could someone provide a quick example of how to include HTML in the PHP file. Thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/ Share on other sites More sharing options...
trq Posted February 8, 2007 Share Posted February 8, 2007 After much research am I correct in thinking that there are no bold or underline tags in PHP. Yes you are correct. PHP outputs strings. Most people use it to output html. You can easily output (or in your case send) html simply by placing it within the string. eg; $body .= "<b />Personal Information<b />\n"; However. To enable an email client to read it as html your will need to add the following to the headers argument of the mail function. "Content-type: text/html\r\n" Quote Link to comment https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/#findComment-180244 Share on other sites More sharing options...
Jessica Posted February 8, 2007 Share Posted February 8, 2007 The php.net manual also shows examples of sending HTML email: http://us3.php.net/manual/en/function.mail.php Quote Link to comment https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/#findComment-180252 Share on other sites More sharing options...
paradrenaline Posted February 9, 2007 Author Share Posted February 9, 2007 thanks! I will give it a shot and report back I appreciate the guidance. Quote Link to comment https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/#findComment-180259 Share on other sites More sharing options...
13th_Star Posted February 9, 2007 Share Posted February 9, 2007 to turn my mail into html format I use this in my headers. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: '.$name.' <'.$email.'>' . "\r\n"; $headers .= 'From: $from <$from_email>' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); Quote Link to comment https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/#findComment-180269 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.