Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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.
Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
In this video we show how to create a mailbox database 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 >> Data…
To show how to create a transport rule 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 >> Rules tab.:  To cr…

785 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