By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,641 Members | 1,446 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,641 IT Pros & Developers. It's quick & easy.

Sending E-Mail from a Windows Service

P: n/a
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
js*******@cox-internet.com
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Jason E. Trout" <ja***@accesseforms.com> wrote in message
news:24**************************@posting.google.c om...
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.
Nov 20 '05 #2

P: n/a
Definately possible. I had a service that did that, but it was running
directly on my IIS server.

Greg

"Jason E. Trout" <ja***@accesseforms.com> wrote in message
news:24**************************@posting.google.c om...
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
js*******@cox-internet.com

Nov 20 '05 #3

P: n/a
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.
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.