Home > ASP Development > Exchange Server vs. SMTP

Exchange Server vs. SMTP



I'm trying to set email script for my ASP page and I'm not working with SMTP, Exchange server is what being used.

Here is the script, what can I change to make this work?

<%
dim con, rs, query
dim MyBody
dim MyCDONTSMail
set con = Server.CreateObject("ADODB.connection")
set rs = Server.CreateObject("ADODB.Recordset")
con.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\InetPub\WWWRoot\DHS\Data\Deployment.mdb; " & _
"User ID=Admin;"
id = request.form("id")
strr_date = request.form("r_date")
strsubject = request.form("r_subject")
strfirst_name = request.form("r_fname")
strlast_name = request.form("r_lname")
stragency = request.form("r_agency")
strrequest = request.form("r_request")

query = "INSERT INTO Service_Request(r_date,r_subject,r_fname,r_lname,r _agency,r_request)"
query = query & " VALUES ("
query = query & "'" & strr_date & "',"
query = query & "'" & strsubject& "',"
query = query & "'" & strfirst_name& "',"
query = query & "'" & strlast_name& "',"
query = query & "'" & stragency & "',"
query = query & "'" & strrequest & "'"
query = query & ")"

Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "deon.gee@dhs.gov"
MyCDONTSMail.To= "deongee@hotmail.com"
MyCDONTSMail.Subject="This is a Test"
MyBody = "Thank you for ordering that stuff" & strfirst_name
MyBody = MyBody & "We appreciate your business" & strlast_name
MyBody = MyBody & "Your stuff will arrive within 7 business days"
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing

response.write (query)
'response.End()
set rs = con.execute(query)
Response.Redirect "../dc_office.asp"
rs.Close
set rs = nothing
con.Close
set con=nothing
%>

    
Guest


Is this your third post about this problem?

MK

Was this answer helpful ? Yes No   
Guest


Yes, because I figured I may not be explaining it right. What is the problem with this script is it because I'm using an exchange server instead of SMTP, can I use an external account like hotmail? And if so how?

Was this answer helpful ? Yes No   
Guest


Just added a post to your original message:

http://forums.aspfree.com/showthrea...86058#post86058

MK

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2010 by Infoqu. All rights reserved