Solved

CDO.Message.1 error '80040220'   The "SendUsing" configuration value is invalid.

Posted on 2008-06-26
1
1,234 Views
Last Modified: 2009-06-01
Hi,
I have a form which is submitted and sent by email.  
My code is:
Set myMail=CreateObject("CDO.Message")                         'CDO
myMail.Subject="Foo Freight - Online Quote Form"
myMail.From=emailAddress
myMail.To="info@foo.biz, suzanne@foo.biz"
myMail.HTMLBody = emailbody            'CDO CODE
myMail.Send
set myMail=nothing

I don't have access to the server, I send the file to the client who uploads it themselves.  
What do I need to do?  Or should I ask them for specific smtp settings on there server?
0
Comment
Question by:harris9999
1 Comment
 
LVL 16

Accepted Solution

by:
CWS (haripriya) earned 500 total points
Comment Utility
Try the below code.

Instead of smtp.server.com findout what is the mail server name and replace it in the code.
Set myMail=CreateObject("CDO.Message")                         'CDO

myMail.Subject="Foo Freight - Online Quote Form"

myMail.From=emailAddress

myMail.To="info@foo.biz, suzanne@foo.biz"

myMail.HTMLBody = emailbody            'CDO CODE

myMail.Send
 

myMail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/sendusing")=2

'Name or IP of remote SMTP server

myMail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserver") _

="smtp.server.com"

'Server port

myMail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _

=25 

myMail.Configuration.Fields.Update

myMail.Send
 

set myMail=nothing

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now