Mail problems on asp script

P

pulse

Guest
Hi,

I am doing the following in asp:

Code:
<%
sub mail(from, mailto, cc, bcc, subject, intro, fields, labels, echo)
	message=intro
	if isarray(fields) then
		for i=0 to ubound(fields)
			value=Trim(Replace(Request.Form.item(fields(i)),"'","&quot;"))
			message=message & "<b>" & labels(i) & ":</b> " & value & "<br>"
		next
	end if

	if echo=1 then Response.Write message

	dim email
	Set email = CreateObject("CDO.Message")
	email.Sender = from
	email.To = mailto
	if cc<>"" then email.cc = cc
	if bcc<>"" then email.Bcc = bcc
	email.Subject = subject
	email.HTMLBody = message
	email.Send
	Set email = nothing
end sub
%>


I get the following error on the jodohost asp server:



CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

/support/funcs/mailform.asp, line 21


What can I do?
 
pulse said:
I get the following error on the jodohost asp server:
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/support/funcs/mailform.asp, line 21
What can I do?

message revised

Wrong answer, sorry: I'm not sure because I'm running .net here, but I think you need to set the SmtpServer property: email.SmtpServer = "mail.yourdomainname.com"

Sorry, my original suggestion wont work for classic ASP, because there is no SmptServer property. I guess CDO gets the server information from the Sender, so I would check to see that the data you are putting in the Sender field is valid.

riley
 
Back
Top