Jump to content

Recommended Posts

Hi,

 

I'm trying to send email with code that I've had taken from a form. The code input is in html form, and I want to take  this code and send it in an email.

 

I have no problem sending a MIME message using pear, if the mime is already placed in, but when I try to place the code from the form it just displays it as it is, and doesnt apply any html to it.

 

 

The code taken from the form is :

<p>format code here</p> <p> </p> <p align="right"><font color="#ffff00"><img alt="" src="http://www.google.com/intl/en_ALL/images/logo.gif" /></font></p>

 

I check the quotes before it so its not that:

if ( get_magic_quotes_gpc() ){
	$emailMessageAfter = htmlspecialchars( stripslashes( $emailMessage ) ) ;
	}

else{
	$emailMessage = htmlspecialchars( $emailMessage ) ;
	}

 

$html = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
        'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<meta http-equiv='content-type' content='text/html; charset=iso-8859-1' />
<title>Confirm Your Membership</title>
<style type='text/css'>
                     <!--
                      body,td,th {
                      font-size: 12px;
                     color:purple;
                     width:650px
                      }
                      h1,h2,h3 {font-family:GeoSansLight;}
                    a {color:blue;}
                    #img{width:300px;height:200px; float:left; overflow:hidden; border:2px solid purple; margin-left:12px;}
                    #buffer{clear:both; height:20px; background-color:white}                    
                     -->
                   </style>
              </head>
              <body>
                <center><h1>Confirm Your Membership</h1></center>  <- all this is formatted in the email
<h1> go</h1>             
  $emailMessageAfter      <--variable with the html code

</body>
</html>";

 

has anyone got an idea how I can get $emailMessageAfter to be read as HTML in the email?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/68613-sending-mail/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.