Solved

Cannot send CDO.Message from Windows Server 2012

Posted on 2013-12-02
11
10,889 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article will review the basic installation and configuration for Windows Software Update Services (WSUS) in a Windows 2012 R2 environment.  WSUS is a Microsoft tool that allows administrators to manage and control updates to be approved and ins…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

730 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