Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-26
1
Medium Priority
?
1,266 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 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Phishing emails are a popular malware delivery vehicle for attack.  While there are many ways for an attacker to increase the chances of success for their phishing emails, one of the most effective methods involves spoofing the message to appear to …
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…
Suggested Courses

885 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