Solved

Cannot send CDO.Message from Windows Server 2012

Posted on 2013-12-02
11
10,662 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
  • 6
  • 4
11 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 400 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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 100 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

My GPO's made for 2008 R2 servers were not allowing me to RDP into a new 2012 server by default.  That’s why I tried to allow RDP via Powershell, because I could log into a remote shell without further configuration. Below I will describe how I wen…
Resolve DNS query failed errors for Exchange
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…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

829 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