Sending E-Mail from a Windows Service

  • Thread starter Thread starter Jason E. Trout
  • Start date Start date
J

Jason E. Trout

I created at VB.NET application that sends e-mail via the
System.Web.Mail namespace. At the application level, the e-mails send
out fine.

When I created the application as a Windows service, the e-mails are
not sent out. I even made it where the service could interact with the
desktop.

Is sending e-mail from System.Web.Mail not possible via Windows
Services?

Thanks,
Jason Trout
(e-mail address removed)
 
I created at VB.NET application that sends e-mail via the
System.Web.Mail namespace. At the application level, the e-mails send
out fine.

When I created the application as a Windows service, the e-mails are
not sent out. I even made it where the service could interact with the
desktop.

Is sending e-mail from System.Web.Mail not possible via Windows
Services?

What account is the service running under? The LocalSystem account cannot
talk to other machines (although I believe there are some exceptions to
this, like anonymous pipes or something) and therefore if your SMTP server
is on another machine in the network, there's your problem. If that's the
case, simply have your service run under a user account.
 
Definately possible. I had a service that did that, but it was running
directly on my IIS server.

Greg
 
Thanks for your response, but it seems that no configuration has
worked. I've installed the service as LocalSystem, LocalService,
NetworkService, and User (with administrator privileges.

It won't send out e-mail through the SMTP server. I am sending to a
remote address, but I'm also utilizing the WININET API to connect to
an ftp server, so it doesn't neccessarily seem that the service can't
access these outside network services.

Any suggestions? I appreciate it.
 
Back
Top