Jump to content

PHP/FLASH MAIL FORM


paradrenaline

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/
Share on other sites

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"

 

Link to comment
https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/#findComment-180244
Share on other sites

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();

Link to comment
https://forums.phpfreaks.com/topic/37679-phpflash-mail-form/#findComment-180269
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.