Forums

This topic is locked

cdosys problem...

Posted 04 May 2004 17:21:17
1
has voted
04 May 2004 17:21:17 David Behan posted:
Hi,

Moved to win 2003 server and have to change around code from CDONTS to CDOSYS. I made the changes but now I am getting this error:

CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

I found it has to do with the default SMTP being set to localhost, which will work fine on my local machine but not on a live server cause the mail server is a different address. I tried specifying the mail server by using the following:

System.Web.Mail.SmtpMail.SmtpServer = "mail.dynamic.ie" <font color=red>Object required: 'System'</font id=red>

and then...

SmtpMail.SmtpServer = "mail.dynamic.ie" <font color=red>Object required: 'System'</font id=red>

and then...

objCDO.SmtpServer = "mail.dynamic.ie" <font color=red>Object doesn't support this property or method: 'objCDO.SmtpServer'</font id=red>

but none worked. Different errors each time. I put the error in red above for each one I used.

Any ideas on how to fix this problem. It's wrecking my head. Cheeurs lads!

Replies

Replied 04 May 2004 21:43:34
04 May 2004 21:43:34 Erik Piisila replied:
I'm pretty sure this method works under 2003:

&lt;%
Dim objMail 'Set objMail = Server.CreateObject("CDO.Message"

With objMail
.To = strTo
.From = strFrom
.ReplyTo = strReplyTo
.BCC = strBCC
.Subject = strSubject
.TextBody = strBody
.Send

End With
Set objMail = Nothing

%&gt;




<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi,

Moved to win 2003 server and have to change around code from CDONTS to CDOSYS. I made the changes but now I am getting this error:

CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

I found it has to do with the default SMTP being set to localhost, which will work fine on my local machine but not on a live server cause the mail server is a different address. I tried specifying the mail server by using the following:

System.Web.Mail.SmtpMail.SmtpServer = "mail.dynamic.ie" <font color=red>Object required: 'System'</font id=red>

and then...

SmtpMail.SmtpServer = "mail.dynamic.ie" <font color=red>Object required: 'System'</font id=red>

and then...

objCDO.SmtpServer = "mail.dynamic.ie" <font color=red>Object doesn't support this property or method: 'objCDO.SmtpServer'</font id=red>

but none worked. Different errors each time. I put the error in red above for each one I used.

Any ideas on how to fix this problem. It's wrecking my head. Cheeurs lads!

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Reply to this topic