Jump to content

sending mail ....


jas4

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

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.