About Jeff Allen Expertise I can answer basic to intermediate questions related to Classic ASP.I can answer Intermediate to Advanced questions CSS& HTML, and basic questions about JavaScript and Ajax. I can also answer questions related to web page accessibility under US Section 508.
Experience I have 8 years experience with HTML. I have been developing in ASP, VBScript and CSS for two years each. I also currently work as web developer.
Organizations IWA-HWG
Education/Credentials I have a BA in English with minors in Web Design and Scientific and Technical Writing
Expert: Jeff Allen Date: 9/22/2006 Subject: Using CDOSYS in ASP email for 1st time...can't resolve error...
Question Jeff,
It is working for me now, but I have a new request related to this issue that I received. I completed a web page at http://hwashington.ccc.edu/excelbasic.htm that allows users to take a pre-test and the results are emailed to my work address (dmacklin@ccc.edu) via online form using CDOSYS. My processing page is an ASP page at http://hwashington.ccc.edu/excelbasic_process.asp which places the form contents into a database table, then emails me the data submitted via CDOSYS and then transfers control to a user confirmation page at http://hwashington.ccc.edu/excelbasic_confirm.htm.
I asked a contact of mine how could I have the data emailed to someone outside of my domail (ccc.edu), and he mentioned that I needed to you need to authenticate to my mail server with your email/pass instead of anonymous connecting (which I was attempting to do). My contact mentioned that he was not sure how its done in ASP but there must be some API with which you can authenticate to mail server with username and password. Do you have any background/suggestions on how this can be done, and what is an API and how would I use it in a case like this.
-------------------------
Followup To
Question -
Jeff,
Thanks for the tip. I was actually able to resolve my problem by changing the code in the previous email to you listed below. The updated code is in the previous email below.
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
With Fields
.Item(cdoSendUsingMethod) = 2
.Item(cdoSMTPServer) = "mail2.ccc.edu"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Update
End With
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = Request.Form("receiver")
.From = Request.Form("iemail")
.Subject = Request.Form("subject")
.HTMLBody = body 'Had to change this code also
'.TextBody = strBody
.Send
End With
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
Normally however, I would think you would want to authenticate the user's email address before submitting data to dbase or sending any emails. Then once it is authenticated do all your processing...
This one (http://quadcomm.com/tips/sendCDOSYSmail.txt) has an example where they use the Configuration fields in CDO to set up amtpauthentication to basic (clear-text) like so:
' Specify the authentication mechanism to basic (clear-text) authentication.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic