Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-06-26
1
Medium Priority
?
1,260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
CWS (haripriya) earned 2000 total points
ID: 21873279
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolve DNS query failed errors for Exchange
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
In this video we show how to create a Distribution Group 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 Recipients >>…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

671 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