Click to See Complete Forum and Search --> : ASP formmail problem


caynada
04-23-2007, 08:37 AM
Can someone please help with this, I am receiving this error from my simple form:

CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

/scripts/formmail.asp, line 19

Here is the asp script I'm using:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'Email Parameters - change as required
ToAddress = "xxxx@xxxx.com"
FromAddress = "info@xxxx.com"
ReplyAddress = Request.Form("emailaddress") 'This is the subscriber's address
MailSubject = "Subscription Request for Mailing List"
MailBody = "The following user has signed up for the Newsletter: " & ReplyAddress
' /Parameters

' Mail Sending via the ASP CDO object
Set objMail = Server.CreateObject("CDO.Message")
objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
objMail.From = FromAddress
objMail.ReplyTo = ReplyAddress
objMail.To = ToAddress
objMail.Subject = MailSubject
objMail.TextBody = MailBody
objMail.Send
set objMail = Nothing
' / Mail Sending

'Redirect to thank you page
Response.Redirect(Request.Form("redirect"))
%>