hi everyone im new to programing im trying to send a html email using my forum mass email option, but every time i send it nothing shows up in the email but a bunch of source code. CAN ANYONE HELP ME PLEASE.
THIS IS MY SOURCE CODE.

<html>
<style type="text/css">
<!--
.style3 {font-family: arial}
.style6 {
font-family: arial;
font-size: 20px;
color: #FF0000;
}
.style9 {color: #000000}
.style10 {color: #FF0000}
.style11 {color: #0000FF}
-->
</style><body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" bgcolor='#000000' >
<span class="style3"></span>



<STYLE>
.headerTop { background-color:#FFCC66; border-top:0px solid #000000; border-bottom:1px solid #FFFFFF; text-align:center; }
.adminText { font-size:10px; color:#996600; line-height:200%; font-family:verdana; text-decoration:none; }
.headerBar { background-color:#FFFFFF; border-top:0px solid #333333; border-bottom:10px solid #FFFFFF; }
.title { font-size:20px; font-weight:bold; color:#CC6600; font-family:arial; line-height:110%; }
.subTitle { font-size:11px; font-weight:normal; color:#666666; font-style:italic; font-family:arial; }
.defaultText { font-size:12px; color:#000000; line-height:150%; font-family:trebuchet ms; }
.footerRow { background-color:#FFFFCC; border-top:10px solid #FFFFFF; }
.footerText { font-size:10px; color:#996600; line-height:100%; font-family:verdana; }
a { color:#FF6600; color:#FF6600; color:#FF6600; }
</STYLE>
<table width="100%" cellpadding="10" cellspacing="0" class="backgroundTable" bgcolor='#999999' >
<tr>
<td valign="top" align="center">



<table width="550" cellpadding="0" cellspacing="0">


<tr>



<tr>
<td style="background-color:#000000;border-top:0px solid #333333;border-bottom:10px solid #FFFFFF;"><center><a href=""><img src="http://jiggytime.com/header.jpg" BORDER="0" title="JiggyTime.com"  alt="Your Company" align="center"></a></center></td>
</tr>
</table>



<table width="550" cellpadding="20" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF" valign="top" style="font-size:12px;color:#000000;line-height:150%;font-family:trebuchet ms;">


<p align="center">
<span style="font-size:20px;font-weight:bold;color:#000000;font-family:arial;line-height:110%;">Party Of The WeeK</span></p>
<p align="center"><span class="style6"><img src="http://jiggytime.com/oct51.jpg" width="400" height="500"></span></p>
<div align="center"><img src="http://jiggytime.com/oct52.jpg" width="400" height="500">
</div>


<p align="left"><span class="style11">*Loction:</span> Sea Breeze Manor (566 nostrand ave bet.atlantic &amp; Herimer)</p>
<p align="left"><span class="style11">*ADM:Adv</span> tix $10 <span class="style10">(more at the door)</span></p>
<p align="left"><span class="style11">*Music By:</span> King Mindas, Web Intl, Shutdown Bros, Music Unlimited &amp; Ricky Blaze </p>


<p align="left"><span class="style11">*Live Video by</span>: JiggyTime.com </p>
<p align="center"><br>
</p></td>
</tr>


<tr>
<td style="background-color:#;border-top:10px solid #FFFFFF;" valign="top">
<span style="font-size:10px;color:#996600;line-height:100%;font-family:verdana;">
*|LIST:DESCRIPTION|* <br />
<br />


<a href="maito:">Unsubscribe</a>  from this list.<br />


<br />
Our mailing address is:<br />
<a href="mailto:Jay@Jiggytime.com">Jay@JiggyTime.com</a><br />
<br />
Our telephone:<br />
<span class="style9">(347)962-1976</span>
<br />
Copyright (C) 2007 JiggyTime.com All rights reserved.<br />


<br />
<a href="maito:">Forward</a> this email to a friend</span></td>


</tr>
</table>


</td>
</tr>
</table>


</body>
</html>

Recommended Answers

All 20 Replies

where is the php code? the part that actually sends the email

im using the mass email option in the forum, the html email shows up in hotmail but not in AOL, GMAIL or YAHOO. Is there any special headers i need to include in the email.

if the forum is run by php, then it has to send out the text/html headers along with the emails.
without the php code i cannot help you. and i think the only reason it works in hotmail is that the hotmail email program is set up to read all of the emails as html.

tthis is code i send from my forum and html page dont show up in gmail or AOL, It just show the code all over again dont know whats with it.
<html>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<style type="text/css">
<!--
style3 {font-family: arial}
style6 {
font-family: arial;
font-size: 20px;
color: #FF0000;
}
style9 {color: #000000}
style10 {color: #FF0000}
style11 {color: #0000FF}
- Hide quoted text -
-->
</style><body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" bgcolor='#000000' >
<span class="style3"></span>


<STYLE>
.headerTop { background-color:#FFCC66; border-top:0px solid #000000; border-bottom:1px solid #FFFFFF; text-align:center; }
.adminText { font-size:10px; color:#996600; line-height:200%; font-family:verdana; text-decoration:none; }
.headerBar { background-color:#FFFFFF; border-top:0px solid #333333; border-bottom:10px solid #FFFFFF; }
.title { font-size:20px; font-weight:bold; color:#CC6600; font-family:arial; line-height:110%; }
.subTitle { font-size:11px; font-weight:normal; color:#666666; font-style:italic; font-family:arial; }
.defaultText { font-size:12px; color:#000000; line-height:150%; font-family:trebuchet ms; }
.footerRow { background-color:#FFFFCC; border-top:10px solid #FFFFFF; }
.footerText { font-size:10px; color:#996600; line-height:100%; font-family:verdana; }
a { color:#FF6600; color:#FF6600; color:#FF6600; }
</STYLE>
<table width="100%" cellpadding="10" cellspacing="0" class="backgroundTable" bgcolor='#999999' >
<tr>
<td valign="top" align="center">


<table width="550" cellpadding="0" cellspacing="0">

<tr>


<tr>
<td style="background-color:#000000;border-top:0px solid #333333;border-bottom:10px solid #FFFFFF;"><center><a href=""><img src="http://jiggytime.com/header.jpg" BORDER="0" title="JiggyTime.com" alt="Your Company" align="center"></a></center></td>
</tr>
</table>


<table width="550" cellpadding="20" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF" valign="top" style="font-size:12px;color:#000000;line-height:150%;font-family:trebuchet ms;">

<p align="center">
<span style="font-size:20px;font-weight:bold;color:#000000;font-family:arial;line-height:110%;">Party Of The WeeK</span></p>
<p align="center"><span class="style6"><img src="http://jiggytime.com/oct51.jpg" width="400" height="500"></span></p>
<div align="center"><img src="http://jiggytime.com/oct52.jpg" width="400" height="500">
</div>

<p align="left"><span class="style11">*Loction:</span> Sea Breeze Manor (566 nostrand ave bet.atlantic & Herimer)</p>
<p align="left"><span class="style11">*ADM:Adv</span> tix $10 <span class="style10">(more at the door)</span></p>
<p align="left"><span class="style11">*Music By:</span> King Mindas, Web Intl, Shutdown Bros, Music Unlimited & Ricky Blaze </p>

<p align="left"><span class="style11">*Live Video by</span>: JiggyTime.com </p>
<p align="center"><br>
</p></td>
</tr>

<tr>
<td style="background-color:#;border-top:10px solid #FFFFFF;" valign="top">
<span style="font-size:10px;color:#996600;line-height:100%;font-family:verdana;">
*|LIST:DESCRIPTION|* <br />
<br />

<a href="maito:">Unsubscribe</a> from this list.<br />

<br />
Our mailing address is:<br />
<a href="mailto:Jay@Jiggytime.com">Jay@JiggyTime.com</a><br />
<br />
Our telephone:<br />
<span class="style9">(347)962-1976</span>
<br />
Copyright (C) 2007 JiggyTime.com All rights reserved.<br />

<br />
<a href="maito:">Forward</a> this email to a friend</span></td>
- Hide quoted text -

</tr>
</table>

</td>
</tr>
</table>

</body>
</html>

now i understand, the code you are posting is what you are sending to users. to make the email programs understand what type of email it is you have to edit the forum code. the html code in the email has to be sent with headers, not with headers sent in the html code. in a few minutes i will post a script to show you what the php code is suppose to look like.

thank you u for your help im going to try and see if i could find out how to send it with the php code, still post the if you have it.....thanks alot

here is the php html email code:

$to = 'somebody@something.com';
$from = 'you@something.com';
$subject = "Your Subject";
$message = <<<EOF
<html>
<body>
 // html email content go here
</body>
</html>
EOF;
$headers  = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$mail = mail($to, $subject, $message, $headers);

sorry i forgot post it sooner. best of luck

kkeith29

thanks for the code, but im using the mass emailing function on my phpbb forum to send a newsletter to all my users, when i send the html email only the source code shows up in the email, but when i send ah text only email it works...........dont know whats wrong.

why don't you use the email address in the database. its the same thing that the mass emailer function is doing. i can make you a seperate page you could run once and it will email everyone.

ok make the page for me, but i dont know how to get the email address from the database. Once again thank you so much for your help!

for me to write the script i need some information from you. What type of database is it (mysql,sql,mssql)? Whats the table name in the database? or if you don't want to mess with any of this, post the forum php code where you send the mass emails from. i will make the changes so the emails will be html.

the database is mysql the table is jiggytim_p_bb1, thank you for your help

i have finished the code. all you need to do is fill in the database connect info. also, the field name for the email address. right now its set to email but you can change it. i have personally tested the script with your html email code and it works. click the link to download it: http://68.103.192.2:8080/email.zip

thank you soo much im going to try it right now i let u know the result thanks alot

one question do i use the mass email function to send the email

no all you have to do is call the page by typing its address in the address bar of the web browser. once it loads it sends all the email and displays a message for each email thats send sucessfully

thank you for your help kkeith29

use the header as

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

this should do the trick. try it out

and for more guide related to html newsletter
http://www.knowledge-transfers.com/it/how-to-write-a-html-newsletter

Why bump a thread that is almost 3 years old? Come on. Look at the date before posting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.