?
Solved

Cannot send CDO.Message from Windows Server 2012

Posted on 2013-12-02
11
Medium Priority
?
11,480 Views
Last Modified: 2013-12-03
Hi Experts,
I've moved my website from Windows Server 2008 to Windows Server 2012.

The problem I encountered is that I can't send email. The code below worked on the old server but it gives me an error on Windows Server 2012.

Set myMail=CreateObject("CDO.Message")
myMail.Subject= request.form("Subject") & " - Test" ' subject of the email
myMail.From= request.form("Email")
myMail.To="webmaster@mysite.com"
myMail.HTMLBody = request.form("Message") & "<b>Test</b>"
myMail.Send
set myMail=nothing


After I submit I get the following error:

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

SMTP Server is installed on Windows Server 2012, but the email feature still doesn't work.
I would appreciate your help.
0
Comment
Question by:romsom
[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
  • 6
  • 4
11 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 1600 total points
ID: 39690586
most likely a permissions issue on the IIS meta database. This article explains 3 possible solutions, one of them is a code change if you don't want to go messing with permissions:

http://blogs.msdn.com/b/akashb/archive/2010/05/24/error-cdo-message-1-0x80040220-the-quot-sendusing-quot-configuration-value-is-invalid-on-iis-7-5.aspx
0
 

Author Comment

by:romsom
ID: 39690800
I've tried the methods suggested and my error message changed:

CDO.Message.1 error '80070005'

Access is denied.

The code change gave me this same error message. I don't know what to do with it.
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 39690808
make sure your IUSR account has access to the folder where the emails are being sent out.
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:romsom
ID: 39690983
IUSR has access, but the error message is the same
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 39690988
did you try the method of changing the permissions for the meta database?
0
 

Author Comment

by:romsom
ID: 39691017
What I'm doing is right click the web site in IIS > Edit Permissions > Security > IUSR and grant full access.
How can I change the permissions for the meta database?
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 39691027
taken from the link i posted:

Grant the IIS_IUSRS group read access to the /LM/SmtpSvc/ and /LM/SmtpSvc/1/ nodes in the IIS Metabase. How can you do it? You can download the Internet Information Services (IIS) 6.0 Resource Kit Tools at http://go.microsoft.com/fwlink/?LinkId=67351. This resource kit includes a Metabase Explorer that works with IIS 6.0 or IIS 7.0 with IIS 6 Management Compatibility role services installed. On IIS 7.0, the IIS Admin Service must be running for the Metabase Explorer tool to work correctly.
Why will this work? It will work because IIS 7 automatically adds the IIS_IUSRS membership to the worker processes token at runtime. By doing this, accounts that have been defined to run as 'application pool identities' no longer need to explicitly be part of the IIS_IUSRS group.
0
 

Author Comment

by:romsom
ID: 39691092
I've downloaded it and I even made sure that the files are in Program Files.
I also restarted the server, but nothing changed. Isn't the problem that I have IIS 8?
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 400 total points
ID: 39691117
Here is an Amazon article with pictures about using IIS 6 SMTP on Server 2012: http://sesblog.amazon.com/post/TxAXMJU3AAN5JA/Using-IIS-SMTP-on-Windows-2008-2012-with-Amazon-SES
0
 

Author Comment

by:romsom
ID: 39691226
I've followed the Amazon article, but I still get this error message:

CDO.Message.1 error '80070005'

Access is denied.
0
 

Author Closing Comment

by:romsom
ID: 39693600
Thank you for your help; it's finally working! I needed to give write permission to the folder C: \ inetpub \ mailroot \ Pickup and that solved the problem. I also found this page helpful:
http://double-slash.net/2010/10/19/cdo-message-1-error-80070005-access-is-denied/
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…
Suggested Courses

743 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