HI I am new to ASP and I am having problems recieveing Web Form email from my hosting server to my OutLook 2003 inbox. I have tested Outlook 2003 with my email addresses and I get a instant test email right away. My hosting company is recomending that I switch to CDOSYS. I don't know how to do that. I need your help. Anyone got any suggestions?
My code is below:
<%
'Set the response buffer to true so we execute all asp code before sending the HTML to the clients browser
Response.Buffer = True
'Dimension variables
Dim strBody 'Holds the body of the e-mail
Dim objCDOMail 'Holds the mail server object
Dim strMyEmailAddress 'Holds your e-mail address
Dim strCCEmailAddress 'Holds any carbon copy e-mail addresses if you want to send carbon copies of the e-mail
Dim strBCCEmailAddress 'Holds any blind copy e-mail addresses if you wish to send blind copies of the e-mail
Dim strReturnEmailAddress 'Holds the return e-mail address of the user
'----------------- Place your e-mail address in the following sting --------------------------
--------
strMyEmailAddress = "info@southasianlife.com"
'----------- Place Carbon Copy e-mail address's in the following sting, separated by ; --------------
strCCEmailAddress = "admin@southasianlife.com"
'Use this string only if you want to send the carbon copies of the e-mail
'----------- Place Blind Copy e-mail address's in the following sting, separated by ; --------------
strBCCEmailAddress = "" 'Use this string only if you want to send the blind copies of the e-mail
'-------------------------
----------
----------
----------
----------
----------
----------
----------
------
'Read in the users e-mail address
strReturnEmailAddress = Request.Form("email")
'Initialse strBody string with the body of the e-mail
strBody = "<h2>Online Subscription submission from South Asian Life Web Site</h2>"
strBody = strBody & "<br><b>Name: </b>" & Request.Form("fname") & " " & Request.Form("lname")
strBody = strBody & "<br><br><b>Gender: </b>" & Request.Form("gender")
strBody = strBody & "<br><br><b>Age: </b>" & Request.Form("age")
strBody = strBody & "<br><br><b>Membership: </b>" & Request.Form("membership")
strBody = strBody & "<br><br><b>Payment Visa Yes: </b>" & Request.Form("paymentvisa"
)
strBody = strBody & "<br><b>Name on the Credit Card: </b>" & Request.Form("ccfname")
strBody = strBody & "<br><br><b>Credit Card Number: </b>" & Request.Form("ccnumber")
strBody = strBody & "<br><b>Credit Card Expiry: </b>" & Request.Form("ccexpmm") & " " & Request.Form("ccexpyyyy")
strBody = strBody & "<br><br><b>Credit Card CVV2: </b>" & Request.Form("cvv2")
strBody = strBody & "<br><br><b>Credit Card Address: -</b>"
If (Request.Form("ccaddress")
) > "" Then
strBody = strBody & "<br> " & Request.Form("ccaddress")
End If
If (Request.Form("ccaddress2"
)) > "" Then
strBody = strBody & "<br> " & Request.Form("ccaddress2")
End If
If (Request.Form("cccity")) > "" Then
strBody = strBody & "<br> " & Request.Form("cccity")
End If
If (Request.Form("ccprovince_
state")) > "" Then
strBody = strBody & "<br> " & Request.Form("ccprovince_s
tate")
End If
If (Request.Form("ccpostal_zi
p")) > "--- Choose One ---" Then
strBody = strBody & "<br> " & Request.Form("ccpostal_zip
")
End IF
If (Request.Form("country")) > "" Then
strBody = strBody & "<br> " & Request.Form("country")
End If
strBody = strBody & "<br><br><b>Terms: </b>" & Request.Form("terms")
strBody = strBody & "<br><b>E-mail: </b>" & strReturnEmailAddress
End If
'Check to see if the user has entered an e-mail address and that it is a valid address otherwise set the e-mail address to your own otherwise the e-mail will be rejected
If Len(strReturnEmailAddress)
< 5 OR NOT Instr(1, strReturnEmailAddress, " ") = 0 OR InStr(1, strReturnEmailAddress, "@", 1) < 2 OR InStrRev(strReturnEmailAdd
ress, ".") < InStr(1, strReturnEmailAddress, "@", 1) Then
'Set the return e-mail address to your own
strReturnEmailAddress = strMyEmailAddress
End If
'Send the e-mail
'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONT
S.NewMail"
)
'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = Request.Form("fname") & " " & Request.Form("lname") & " <" & strReturnEmailAddress & ">"
'Who the e-mail is sent to
objCDOMail.To = strMyEmailAddress
'Who the carbon copies are sent to
objCDOMail.Cc = strCCEmailAddress
'Who the blind copies are sent to
objCDOMail.Bcc = strBCCEmailAddress
'Set the subject of the e-mail
objCDOMail.Subject = "Online Subscription submission from South Asian Life website"
'Set the e-mail body format (0=HTML 1=Text)
objCDOMail.BodyFormat = 0
'Set the mail format (0=MIME 1=Text)
objCDOMail.MailFormat = 0
'Set the main body of the e-mail
objCDOMail.Body = strBody
'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1
'Send the e-mail
objCDOMail.Send
'Close the server object
Set objCDOMail = Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<style type="text/css">
<!--
body {
background-image: url(../canada/buttons/_bkg
d/bkgd_769
x1500.jpg)
;
}
-->
</style>
<link href="../CSS/wedding/3col_
leftNav.cs
s" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style47 {color: #333333}
.style134 {font-size: 10.5px; font-family: Tahoma;}
.style140 {font-size: 9px}
.style158 {
font-weight: bold;
font-size: 11px;
}
.style10 {font-size: 10px}
a:link {
color: #333333;
text-decoration: none;
}
a:visited {
color: #333333;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: none;
}
.style164 {
font-family: "Arena Black";
color: #FF6600;
font-weight: bold;
}
.style172 {
font-family: "Arena Black";
color: #339900;
font-weight: bold;
}
.style180 {
font-family: "Arena Black";
color: #CC00FF;
}
a:active {
text-decoration: none;
}
.style183 {font-size: 9px; font-style: italic; }
.style185 {font-family: "Arena Black"; color: #FF0000; }
.style188 {font-family: "Arena Black"; font-weight: bold; color: #CC00FF; }
.style191 {
font-family: "Arena Black";
font-weight: bold;
color: #FF0000;
font-size: 10px;
}
.style192 {
color: #FF0000;
font-weight: bold;
}
.style193 {color: #999999}
.style194 { font-family: Tahoma;
color: #707070;
font-size: 10px;
}
.style195 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
.style197 {color: #FF0000; font-weight: bold; font-family: "Arena Black"; }
.style199 {font-family: "Arena Black"; color: #000000; font-weight: bold; }
-->
</style>
<style type="text/css">
<!--
.style214 {font-size: 18px}
-->
</style>
</head>
<body>
<div align="center">
<table width="750" cellpadding="0" cellspacing="0">
<tr>
<th rowspan="2" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" scope="col"><table width="173" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<tr>
<td valign="top" bgcolor="#FFFFFF"><div align="left"> <a href="../homepage.asp"><im
g src="../canada/images/logo
/new2005lo
go.jpg" alt="home page" width="100" height="52" border="0" longdesc="
http://southasianlife.com"
></a><br>
<font face=arial><span class="style140"><b>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMont
h() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
document.write(lmonth + " ");
document.write(date + ", " + year);
// End -->
</SCRIPT>
</b></font>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div id="navBar">
<div id="search"></div>
<div id="sectionLinks">
<ul class="style134">
<li class="style158">
<div align="left">
<h4><span class="style197"><div id="search">
<form method=GET action="
http://southasianlife.master.com/texis/master/search/mysite.html">
<table width="160" border="0">
<tr>
<td colspan="2"><span class="style217">South Asian Life ::.</span> </td>
</tr>
<tr>
<td width="71"><input name=q class="style158" value="" size="10"></td>
<td width="79"><input name="submit" type=submit class="style158" value="Search"></td>
</tr>
</table>
</form>
</div>
<li class="style158">
<div align="left">
<h4><a href="../canada/citylife">
<span class="style197">|</span> <strong>city life</strong> - <span class="style183">events listings....+</span></a></
h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/articles">
<span class="style197">|</span> <strong>articles</strong> - <span class="style183">fiction, real-life...+</span> </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/books"><st
rong><span
class="style185">|</span><
/strong> <strong>books</strong> - <span class="style183">reviews & best reads...+</span> </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/astrology"
><strong><
span class="style180">|</span><
/strong> astrology </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/weddings">
<strong><s
pan class="style180">|</span><
/strong> weddings </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/fashion"><
strong><sp
an class="style180">|</span><
/strong> fashion & beauty </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/bollywood"
><span class="style188">|</span> bollywood & music </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/youth"><sp
an class="style164">|</span> our youth </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/life"><spa
n class="style164">|</span> our people, our life</a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/health"><s
pan class="style164">|</span> our health, our body </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/food"><spa
n class="style172">|</span> food & wine </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/home"><spa
n class="style172">|</span> house & home </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/money"><sp
an class="style172">|</span> money guide </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/realestate
"><span class="style172">|</span> real estate </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/Society"><
span class="style199">|</span> society </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/travel"><s
pan class="style199">|</span> travel </a></h4>
</div>
</li>
<li class="style158">
<div align="left">
<h4><a href="../canada/new-immigr
ant"><span
class="style199">|</span> new immigrants </a></h4>
</div>
</li>
</ul>
</div>
</div></td>
</tr>
</table></th>
<th height="54" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" scope="col"><div align="left">
<object classid="clsid:D27CDB6E-AE
6D-11cf-96
B8-4445535
40000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="572" height="60">
<param name="movie" value="../flash/_top_nav_b
ar/swf/_to
pnavbar.sw
f">
<param name="quality" value="high">
<embed src="../flash/_top_nav_bar
/swf/_topn
avbar.swf"
quality="high" pluginspage="
http://www.macromedia.com/go/getflashplayer" type="application/x-shockw
ave-flash"
width="572" height="60"></embed>
</object>
</div></th>
<th bordercolor="#FFFFFF" bgcolor="#FFFFFF" scope="col"> </th>
</tr>
<tr>
<th rowspan="2" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" scope="col"><div align="left">
<table width="56%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2">
<h1 align="center" class="style214"> </h
1>
<h1 align="center" class="style214"> </h
1>
<h1 align="center" class="style214">Successfu
l Submission </h1></td>
</tr>
</table>
<br>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"> <p>Thank-you
<% = Request.Form("fname") %>
<% = Request.Form("lname") %>
for filling in the online subscription form.<br>
We will be processing your subscription shortly and <br>
will reply with a confirmation as soon as possible.</p>
<p><span class="style10"><a href="registration.asp">pl
ease click here to contiune with your registration</a> </span></p></td>
</tr>
</table>
<div align="center"><br>
</div>
</div></th>
<th height="372" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" scope="col"> </th>
</tr>
<tr>
<td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <div align="center"></div></td>
<td bgcolor="#FFFFFF"> </
td>
</tr>
<tr>
<td colspan="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="center">
<hr size="1">
<a href="../Templates/canada/
media-kit"
><br>
<span class="style195">advertise
with us</span></a> <span class="style191">|</span> <span class="style195"><a href="../Templates/privacy
.html">pri
vacy policy</a> <span class="style197">|</span><
/span> <span class="style195"><a href="../Templates/termsof
use.html">
terms & conditions</a></span>
<p class="style140"><span class="style194">SouthAsia
nLife.Com,
South Asian Life magazine © 2005 are a div. of <span class="style192">M</span> Magazine Inc.<br>
<br>
[ " <span class="style193">South Asian</span> " <span class="style47">Religion</
span> : Hindu, Muslim, Sikh, Christian, Jain, Parsi, Jewish] <br>
[ " <span class="style193">South Asian</span> " <span class="style47">Community<
/span> : Punjabi, Tamil, Telugu, Kannada, Sindhi, Gujarati, Marathi, <br>
Bengali, Malayalam, Hindi, Catholic, Islamic.]</span></p>
<p class="style140"> </p
>
</div></td>
<td bgcolor="#FFFFFF"> </
td>
</tr>
</table>
</div>
</body>
I appericate your time and help in advance