Cannot send the emails through the ASP Form -
i unable send email through form because of following error. assume form doesn't work because of depricated cdo? i'm not sure, not sure how fix problem.
cdo.message.1 error '80040220' "sendusing" configuration value invalid. /thankyou.asp, line 24
the code
<% set objmail = server.createobject("cdo.message") objmail.configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objmail.configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" objmail.configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objmail.configuration.fields.update objmail.from = request.form("email") ' change email address objmail.to = "admin@domain.com" ' change email address objmail.subject = "name questions/comments" ' change subject 'set e-mail body format (htmlbody=html textbody=plain) 'set e-mail body format (htmlbody=html textbody=plain) objmail.htmlbody = "<font size=3 face=verdana>" objmail.htmlbody = objmail.htmlbody & "<strong>" & "from: " & "</strong>" & request.form("name") & "<br>" objmail.htmlbody = objmail.htmlbody & "<strong>" & "email: " & "</strong>" & request.form("email") & "<br>" objmail.htmlbody = objmail.htmlbody & "<strong>" & "phone: " & "</strong>" & request.form("phone") & "<br>" & "<br>" objmail.htmlbody = objmail.htmlbody & "<strong>" & "questions/comments: " & "</strong>" & "<br>" & replace(request.form("details"), vbcrlf, "<br />") & "<br>" & "<br>" & "</font>" 'objmail.htmlbody = objmail.htmlbody & "<em>" & "sent @ " & now() & "</em>" & "</font>" objmail.send() set objmail = nothing* %> i don't have access physical server , cannot change permissions myself.
any ideas how can fix piece of code make work again?
i have tried this: http://forums.iis.net/t/1146477.aspx?the+sendusing+configuration+value+is+invalid+
changing sendusing 1.
and setting google snmp send emails without results. information helpful.
replace code this:
<% set cdoconfiguration = server.createobject("cdo.configuration") cdoconfiguration .fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" .fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 .fields.update end dim tmpstr tmpstr = "" tmpstr = "<font size=""3"" face=""verdana"">" tmpstr = tmpstr & "<ul>" tmpstr = tmpstr & "<li><strong>" & "from: " & "</strong>: " & request.form("name") & "</li>" tmpstr = tmpstr & "<li><strong>" & "email: " & "</strong>: " & request.form("email") & "</li>" tmpstr = tmpstr & "<li><strong>" & "phone: " & "</strong>: " & request.form("phone") & "</li>" tmpstr = tmpstr & "<li><strong>questions/comments</strong>:<br/>" tmpstr = tmpstr & replace(request.form("details"), vbcrlf, "<br />") tmpstr = tmpstr & "</li>" tmpstr = tmpstr & "</ul>" tmpstr = tmpstr & "<p>sent @ " & now() & "</p>" tmpstr = tmpstr & "</font>" set newmailobj = server.createobject("cdo.message") newmailobj.configuration = cdoconfiguration newmailobj.subject = "name questions/comments" newmailobj.from = request.form("email") newmailobj.to = "admin@domain.com" newmailobj.htmlbody = tmpstr newmailobj.send set newmailobj = nothing set cdoconfiguration = nothing %> and let know if works that, cause if does, code (or @ least part paste us) not correct...
and, way, if you're using localhost i'm sure server configuration not necessary... obligatory if use remote server smtp.server.com
Comments
Post a Comment