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

x
?
Solved

Using MailEnable with ASP...Getting Server.CreateObject Failed error

Posted on 2009-06-30
7
Medium Priority
?
1,048 Views
Last Modified: 2012-05-07
Here's the bullets

- Using MailEnable on Windows 2003 machine
- Getting an error when using ASP to send mail ... Server.CreateObject("MEMail.Message") failed
- Been looking around the Net (for hours now) for solutions without success

From what I've read, it is probably permissions, but I cant figure out what exactly to do on that.  Not too familiar with server-side stuff beyond ASP.  Could someone give me some straightforward steps for checking to see if this is in fact a permissions problem, or another solution if you dont think its related to permissions?   My brain is fried over this at the moment.  Thanks...
'MailEnable version of the SendEmail function
    Const MAIL_SERVER = "www.myserver.com"
 
    'Create a message object
    Dim objMsg
    Set objMsg = Server.CreateObject("MEMail.Message")
 
    'Populate the message
    With objMsg
        .ContentType = "text/html;"
 
        'Sender Info
        .MailFrom = "myemail@comcast.net"
        '.MailFromDisplayName = strReturnEmail
 
        'To
        .MailTo "myemail@comcast.net"
 
        'Body
        .Subject 	= sEmailSubject
        .MessageBody  = sEmailBodyClamp
 
        .Server = MAIL_SERVER
        .SendMessage
 
        'Pass back any errors
        SendEmailMailEnable = .ErrorString
    End With
 
	Set objMail = Nothing

Open in new window

0
Comment
Question by:soBC
[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
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:lharrispv
ID: 24748714
is there an error number associated with this or just failed?
0
 

Author Comment

by:soBC
ID: 24749088
Sorry, here's the complete error

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/fan/sql/send_email_test.asp, line 19

800401f3
0
 
LVL 8

Accepted Solution

by:
lharrispv earned 1824 total points
ID: 24749250
From: http://forums.digitalpoint.com/showthread.php?t=21069

Q: AspMail never works. I get Server object error 'ASP 0177:800401f3'. What is the problem?

A: This error means "Invalid class string" -- in other words the call to CreateObject failed because the name object cannot be found by the OLE sub-system. Causes include:

1. You really didn't run regsvr32 on the server after all.
2. You ran regsvr32 but it reported an error.
3. Someone modified security on part of the registry that's preventing the OLE subsystem from reading all or part of the HKEY_CLASSES_ROOT tree.
4. The name of the object you are trying to create was mispelled or is incorrect.
5. Determine if it's a permissions problem

Add the anonymous user (used by IIS) to the Administrators group. The test page then worked, proving it was a permissions problem. Do not forget to remove the anonymous IIS user from the Admin group!

6. Determine if it is a file permissions problem:

After removing the Anonymous user from the Admin group, add failure auditing to the file (smtpsvg.dll), which will determine if the file was ever accessed (by the lack of the failure event). If it isn't, this makes it clear that the failure is prior to file access but go ahead and check file/directory permissions to make sure the anonymous IIS user can access the file.

7. Check registry permissions

Using Regedt32, do find on smtpsvg.dll. Check the permissions for the key (and sub keys), and make sure that the anonymous user has read rights. Do a find on the class-id, which contains the location value, and version, and check those permissions as well.
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:soBC
ID: 24749500
I've seen this before.  Here's where I got stuck.

1.  Im not sure what Im supposed to run regsvr32 on.  Im trying to use MailEnable.
2.  See #1
3.  Unfortunately, I have no idea how to sleuth this option
4.  I can eliminate this one
5.  I added the Anonymous account, but my test page still didnt work.
6.  Not sure how to add failure auditing to a file

0
 
LVL 8

Expert Comment

by:lharrispv
ID: 24749569
Have you looked in the MailEnable documentation?
http://www.mailenable.com/references.asp
0
 

Author Comment

by:soBC
ID: 24750477
Yeah, I've been all through it.  I actually found the solution off a link from the list you posted.  Something to do with meta data.  It works, but Im still not sure why...
<!-- 
METADATA 
TYPE="typelib" 
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" 
NAME="CDO for Windows 2000 Library" 
--> 
<%
	Set cdoConfig = CreateObject("CDO.Configuration") 
	
	With cdoConfig.Fields 
	.Item(cdoSendUsingMethod) = cdoSendUsingPort 
	.Item(cdoSMTPServer) = "mail.myserver.com" 
	.Update 
	End With 
	
	Set cdoMessage = CreateObject("CDO.Message") 
	
	With cdoMessage 
	Set .Configuration = cdoConfig 
	.From = "me" 
	.To = "me" 
	.Subject = "Test MailEnable message" 
	.TextBody = "Stick this in your mail message and enable it" 
	.Send 
	End With 
	
	Set cdoMessage = Nothing 
	Set cdoConfig = Nothing 
%>

Open in new window

0
 

Author Comment

by:soBC
ID: 24750488
Actually, I take it back.  That's not MailEnable, but CDO wasn't working either.  I figured I'd try both until I got one of them to work.  Still not sure why MailEnable doesn't work though...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

610 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