Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cannot send CDO.Message from Windows Server 2012

Posted on 2013-12-02
11
Medium Priority
?
11,884 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 34

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 34

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

 

Author Comment

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

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 34

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 84

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Resolve DNS query failed errors for Exchange
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

604 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