followed is a function I created and the HTML syntax I am using
for some strange reason I can't get it to work, any idea ?
strBody = "<table><tr ><td colspan=2><b>Co tact
Information</b></td></tr>"_
&" </tr><td>Name :</td><td>" & strName & "</td></tr>"_
&" </tr><td>Email :</td><td>" & strEmail & "</td></tr>"_
&" </tr><td>Home Phone :</td><td>" & strHomePh & "</td></tr>"_
&" </tr><td>Work Phone :</td><td>" & strWorkPh & "</td></tr>"_
&" </tr><td>Cell Phone :</td><td>" & strCellPh & "</td></tr>"_
&" </tr><td>Refered by :</td><td>" & strRfBy &
"</td></tr></table><Br>"_
&" <table><tr><t d colspan=2 align=center><b >Moving From</b></td><td
colspan=2 align=center><b >Moving To</b></td></tr>"_
&" <tr><td>Addre ss :</td><td>" & strFAdd & "</td><td>Address :
</td><td>" & strTAdd & "</td></tr>"_
&" <tr><td>City :</td><td>" & strFCity & "</td><td>City : </td><td>" &
strTCity & "</td></tr>"_
&" <tr><td>State :</td><td>" & strFState & "</td><td>State : </td><td>"
& strTAdd & "</td></tr>"_
&" <tr><td>Zip :</td><td>" & strFZip & "</td><td>Zip : </td><td>" &
strTZip & "</td></tr>"_
&" <tr><td>Size of residence: :</td><td>" & strFSize & "</td><td>Size
of residence : </td><td>" & strTSize & "</td></tr>"_
&" <tr><td># of Bedrooms :</td><td>" & strFBed & "</td><td># of
Bedrooms : </td><td>" & strTBed & "</td></tr>"_
&" <tr><td># of rooms :</td><td>" & strFRoom & "</td><td># of rooms :
</td><td>" & strTRoom & "</td></tr>"_
&" <tr><td colspan=2>Move date:</td><td colspan=2>" & strMoveDt &
"</td></tr></table><br>"_
&"<table><tr><t d><table><tr><t d><b>Family
Room</b></td><td><b>Quant ity</b></td></tr>"_
&" <tr><td>Arm Chair</td><td>" & strArm &
"</td></tr><tr><td>Sofa </td><td>" & strSofa & "</td></tr>" _
&" <tr><td>Love Seat</td><td>" & strSeat &"</td></tr><tr><td>Coff ee
Table</td><td>" & strCoffe & "</td></tr>"_
&" <tr><td>TV</td><td>" & strTv & "</td></tr><tr><td>Ente rtainment
Center</td><td>" & strEnt & "</td></tr>"_
&" <tr><td>  ;</td></tr>"_
&"
<tr><td><b>Stud y</b></td><td><b>Quant ity</b></td></tr><tr><td>Desk </td><td>"
& strDesk & "</td></tr>"_
&" <tr><td>File Cabinet</td><td>" & strFile & "</td></tr><tr><td>Book
Case</td><td>" & strBook & "</td></tr>"_
&" <tr><td>  ;</td></tr>"_
&" <tr>
<td><b>Boxes</b></td><td><b>Quant ity</b></td></tr><tr><td>Smal l</td><td>" &
strSmall & "</td></tr>"_
&" <tr><td>Mediu m</td><td>" & strMedium &
"</td></tr><tr><td>Larg e</td><td>" & strLarge & " </td></tr>"_
&" <tr><td>Wardrob e</td><td>" & strWardrobe &
"</td></tr><tr><td>Pict ure</td><td>" & strPicture &
"</td></tr></table></td>"_
&" <td> </td>"_
&" <td><table><tr> <td><b>Dining
Room</b></td><td><b>Quant ity</b></td></tr>"_
&" <tr><td>China Cabinet</td><td>" & strChina &
"</td></tr><tr><td>Chai rs</td><td>" & strChairs & "</td></tr>"_
&" <tr><td>Table </td><td>" & strTable & "</td></tr>"_
&"
<tr><td>  ;</td></tr><tr><td><b>K itchen</b></td><td><b>Quant ity</b></td></tr>"_
&" <tr><td>Applian ces</td><td>" & strApp &
"</td></tr><tr><td>Tabl e</td><td>" & strTab & "</td></tr>"_
&" <tr><td>Chair s</td><td>" & strChair & "</td></tr>"_
&"
<td> </td><tr><td><b>B edroom</b></td><td><b>Quant ity</b></td></tr>"_
&" <tr><td>Doubl e Bed</td><td>" & strDouble & "</td></tr><tr><td>Quee n
Bed</td><td>" & strQueen & "</td></tr>"_
&" <tr><td>King Bed</td><td>" & strKing & "</td></tr><tr><td>Sing le
Bed</td><td>" & strSingle & "</td></tr>"_
&" <tr><td>Dresser </td><td>" & strDresser &
"</td></tr></table></td></table></tr></table><br>"_
&" <table><tr><td> <b>Comments :</b></td><td>" & strComments &
"</td></tr></table><br>"
call getquote
Response.Write "Thank You for Submitting the Request"
%>
<!--#include file="footer.as p"-->
<%
Function Getquote()
Dim objNewMail
Set objNewMail = CreateObject("C DONTS.NewMail")
objNewMail.From =StrEmail
objNewMail.To=" ra***@hotmail.c om"
objNewMail.Subj ect="A New Quote Request"
objNewMail.Body =strbody
objNewMail.Body Format = objNewMailForma t.Html
objNewMail.Send
Set objNewMail = Nothing
END Function
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OO******** ******@TK2MSFTN GP10.phx.gbl...
Assuming you are talking about ASP.Net (your original post just said
"ASP") and you are using the classes in the System.Web.Mail namespace,
simply set the MailFormat property of your MailMessage
Dim mail As MailMessage = New MailMessage()
mail.From = sFrom
mail.To = sTo
mail.Subject = sSubject
mail.Body = sBody
mail.BodyFormat = MailFormat.Html
If you are using something else, it surely exposes a similar property that
let's you set the format...check the docs :)
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Rani" <ra***@hotmail. com> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. . and how do i set the email to be html ?
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. you could set the email to be HTML and use tables <br /> and that kinda
stuff....
otherwise, you can put a VbCrLf for a new line..
strbody = "Name :" & strname & VbCrLf & "Email :" ...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Rani" <ra***@hotmail. com> wrote in message
news:eu******** ******@TK2MSFTN GP15.phx.gbl...
hi guys I need to send an email from a form
the form is collecting data from a user and then submits it to us.
I would like the email to appear in the following format
Name:
Email:
Etc.
all I was able to do so far is:
strBody = "Name :" & strname & " Email :" & StrEmail
etc.
any idea ?