Solved

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

Posted on 2008-06-26
1
1,247 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

New-MailboxSearch Powershell Command and step by step approach to Search and Extract Emails form Exchange 2013 Journaling server.
The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
In this video we show how to create a User Mailbox 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 >> Mailb…
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…

626 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