System.Web.Mail.SmtpMail in Windows Services

  • Thread starter Thread starter pacarrier
  • Start date Start date
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
 
Is the service running with enough permissions to send mail? The console and
Windows Forms app likely ran under admin privileges.
 
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.




.
 
Back
Top