System.Web.Mail.SmtpMail in Windows Services

P

pacarrier

Hi,

I'm trying to send email through a Windows Service app.
using System.Web.Mail.SmtpMail and I get the following
exception:

System.Web.HttpException: Could not access 'CDO.Message'
object.

---> System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an
invocation. --->
System.Runtime.InteropServices.COMException (0x80040220):
The "SendUsing" configuration value is invalid.

My code works fine with a console application or a
Windows forms application. Is it possible to make it
work in a Windows Service? if not, any work around?

Thank you.

PA
 
E

Ed Kaim [MSFT]

Is the service running with enough permissions to send mail? The console and
Windows Forms app likely ran under admin privileges.
 
G

Guest

It's running in the LocalSystem account.
-----Original Message-----
Is the service running with enough permissions to send mail? The console and
Windows Forms app likely ran under admin privileges.




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top