Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Sending HTML emails with Images/formatting

the mail() function

Moderators: macek, egami, gesf

Sending HTML emails with Images/formatting

Postby chellert » Thu May 19, 2011 3:38 pm

I have a form that allows the user to enter text into a php text editor, if they submit the form with no formatting I am able to receive an HTML email.

If the user formats the text (colour, font size and font type) nothing is passed. Or if the if user add an image to the body of the email, the email does not get submitted.

can anyone provide some help? This is my code to send:

$headers = "From: $from\n" . "MIME-Version: 1.0\n" .
"Content-type: text/html; charset=iso-8859-1";
$message = "<table width='900' border='0' align='left' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF' style='border: 1px solid #666666;'>
<td> <div align='center'> </div>
<table width='900' border='0' cellpadding='8' cellspacing='0'>
<td><table width='900' border='0' align='center' cellpadding='8' cellspacing='0' bgcolor='#FFFFFF' style='border: 1px dashed #666666;'>
<tr align='left' valign='top' bgcolor='#CCCCCC'>
<td><img src=''></td>
<tr align='left' valign='top'>
<td><strong><font size='2' face='Arial, Helvetica, sans-serif'>Dear $name: </font></strong></td>
<tr align='left' valign='top' bgcolor='#EFEFEF'>
<td ><strong><font size='2' face='Arial, Helvetica, sans-serif'>{$_REQUEST['rte1']}</font></strong></td>
New php-forum User
New php-forum User
Posts: 10
Joined: Tue Apr 20, 2010 8:54 am

Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.