Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Html Body Format
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Html Body Format

 Post Reply Post Reply
Author
padoxky View Drop Down
Groupie
Groupie
Avatar

Joined: 17 June 2004
Location: Nigeria
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote padoxky Quote  Post ReplyReply Direct Link To This Post Topic: Html Body Format
    Posted: 08 October 2005 at 12:20pm
I want to send email that contains something like letterhead from my website. Is something like newsletters when i send to my subscriber it will go along with my formated table, logo and the text msg.
 
i did something like this:
 
 
strName = Replace(Request.Form("n"), "'", "''")
 strEmail = Replace(Request.Form("e2"), "'", "''")
 strEmailTo = trim(request.form("e2"))
 strTitle = trim(request.form("3"))
 strDetail = trim(request.form("1"))
 
 htmlBody = htmlBody & "<div align='center'>"
htmlBody = htmlBody & "<table border='0' width='67%' height='310' cellpadding='2' style='border-collapse: collapse; border: 1px solid #C7D2DC'>"
htmlBody = htmlBody & "<tr>"
htmlBody = htmlBody & "<td height='66' width='100%' valign='top'>"
htmlBody = htmlBody & "<div align='center'>"
htmlBody = htmlBody & "<table border=0 width=100% id=table2 cellspacing=0 cellpadding=0 height=64>"
htmlBody = htmlBody & "<tr>"
htmlBody = htmlBody & "<td width=61% valign=bottom>"
htmlBody = htmlBody & "<p align=center><a href='dir/default.asp'>"
htmlBody = htmlBody & "<img border=0 src='dir/dir_img/log.gif' width=299 height=55 alt='YellowPage Nigeria Online Directories'></a></td>"
htmlBody = htmlBody & "<td width='39%'>"
htmlBody = htmlBody & "<p align='center'><b><font size='1' face='Verdana' color='#FF0000'>"
%> <%=formatDateTime(Date,1)%>
<%
htmlBody = htmlBody & "</font></b></td>"
htmlBody = htmlBody & "</tr>"
htmlBody = htmlBody & "</table>"
htmlBody = htmlBody & "</div>"
htmlBody = htmlBody & "</td></tr><tr>"
htmlBody = htmlBody & "<td height=10 width=493 style='border-top:1px solid #C7D2DC; border-left-width: 1px; border-right-width: 1px; border-bottom-width:1px' bgcolor=#E6FFF2 valign=bottom>"
htmlBody = htmlBody & "<font face=Verdana>&nbsp;<font style='font-size: 9pt'>"
htmlBody = htmlBody & "<font color=#0000FF>"
htmlBody = strName
htmlBody = htmlBody & "</font> sent you a Joke from Nigeria Online Directories</font></font></td>"
htmlBody = htmlBody & "</tr><tr>"
htmlBody = htmlBody & "<td height='29' width='493' style='border-top:1px solid #C7D2DC; border-left-width: 1px; border-right-width: 1px; border-bottom-width:1px' valign='top'>"
htmlBody = htmlBody & "<p align=center><b><font size=1 face=Verdana><br>"
htmlBody = htmlBody & "</font><font face=Verdana style='font-size: 9pt'>"
htmlBody = strTitle
htmlBody = htmlBody & "</font></b></td>"
htmlBody = htmlBody & "</tr><tr>"
htmlBody = htmlBody & "<td height='199' width='493' style='border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px dotted #C7D2DC' valign='top'><br>"
htmlBody = strDetail
htmlBody = htmlBody & "</td>"
htmlBody = htmlBody & "</tr><tr>"
htmlBody = htmlBody & "<td height=42 width=493 style='border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px dotted #C7D2DC' valign='top'><font size='1' face='Verdana'><br>More Jokes <a href='http://yellowpage.ngwebdesigns.net/dir/jokes.asp'>click here</a>&nbsp;&nbsp;&nbsp;&nbsp;<br>"
htmlBody = htmlBody & "For Online Directories, Advertisement, Business Contact, Jokes, Love Note and"
 htmlBody = htmlBody & "lot more. <br>Visit website <a href='http://www.yellowpage.ngwebdesigns.net'>"
htmlBody = htmlBody & "
.
For">http://www.yellowpage.ngwebdesigns.net</a>.<br>For
website designs visit website"
htmlBody = htmlBody & "<a href='http://www.ngwebdesigns.net'>http://www.ngwebdesigns.net</a><br>"
htmlBody = htmlBody & "&nbsp;</font></td></tr><tr><td height='3' width='493' bgcolor='#008000'>"
htmlBody = htmlBody & "<div align='center'><table border='0' width='504' id='table1' cellspacing='0'>"
htmlBody = htmlBody & "<tr><td width='330' bgcolor='#FFFF00'>"
htmlBody = htmlBody & "<p align='center'><font size='1' face='Verdana'>&copy;2005, YellowPage</font></td>"
htmlBody = htmlBody & "<td width='170' bgcolor='#FFFF00'><p align='right'><b><font size='1' face='Verdana'>"
htmlBody = htmlBody & "<a target='_blank' href='http://www.ngwebdesigns.net'>"
htmlBody = htmlBody & "<span style='text-decoration: none'><font color='#000000'>powered by NgWebDeisgns</font></span></a></font></b></td></tr></ta ble></div></td></tr></table></div>"
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
 Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
  objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
  objCDOSYSCon.Fields("
http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  objCDOSYSCon.Fields("
http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  objCDOSYSCon.Fields.Update
  Set objCDOSYSMail.Configuration = objCDOSYSCon
  objCDOSYSMail.From = strEmail
  objCDOSYSMail.To = strEmailTo
  objCDOSYSMail.Subject = strName & "[Send you a Joke]"
  objCDOSYSMail.HTMLBody = htmlBody
    
  objCDOSYSMail.Send
  Set objCDOSYSMail = Nothing
  Set objCDOSYSCon = Nothing
Response.redirect "page.htm"
end if
 
 
NgWebDesigns
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2005 at 9:05pm
First make sure your email client doesn't have html turned off.

Many email clients are stricter about valid html than browsers are. You your htm needs to start and end with html, head, and body tags.

BTW... I think you misspelled NgWebDesigns as NgWebDeisgns Wink

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.