473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Sending Email from a windows service

I am trying to write a service that will send an email when certain events
occur.

It would seem that I should use the System.Web.Mail to send SMTP mail,
however when I try to import System.Web.Mail into my Service it shows as an
error in my Visual Studio.
(Namespace or type 'Mail' for the Imports System.Web.Mail cannot be found.)

I can import this into my web apps. SMTP is running on my development
machine.

Am I trying to do the impossible? Is there another way to send email from a
service?
Nov 20 '05 #1
2 2810
Found it!

I needed to Add System.Web under References in the project.

"Roger Twomey" <ro******@vnet.on.ca> wrote in message
news:uo**************@TK2MSFTNGP12.phx.gbl...
I am trying to write a service that will send an email when certain events
occur.

It would seem that I should use the System.Web.Mail to send SMTP mail,
however when I try to import System.Web.Mail into my Service it shows as an error in my Visual Studio.
(Namespace or type 'Mail' for the Imports System.Web.Mail cannot be found.)
I can import this into my web apps. SMTP is running on my development
machine.

Am I trying to do the impossible? Is there another way to send email from a service?

Nov 20 '05 #2
Found it!

I needed to Add System.Web under References in the project.

"Roger Twomey" <ro******@vnet.on.ca> wrote in message
news:uo**************@TK2MSFTNGP12.phx.gbl...
I am trying to write a service that will send an email when certain events
occur.

It would seem that I should use the System.Web.Mail to send SMTP mail,
however when I try to import System.Web.Mail into my Service it shows as an error in my Visual Studio.
(Namespace or type 'Mail' for the Imports System.Web.Mail cannot be found.)
I can import this into my web apps. SMTP is running on my development
machine.

Am I trying to do the impossible? Is there another way to send email from a service?

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: DraguVaso | last post by:
Hi, I need to send some emails in my Windows Service (VB.NET 2005). I made for that a simple class, which works fine when I use it in a Windows Forms application. Although: When I put it in...
13
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP server using the SmtpMail class. However, using...
2
by: Mark | last post by:
I have a service that I've built that runs on our web server. The web service has a reference to the System.Web namespace so it can use the classes titled: MailMessage SmtpMail My web...
3
by: VB Programmer | last post by:
My company has it's own webserver, which is going to host our ASP.NET web application. We want the website to be able to send out emails. 1. What do I need on the server so that it has the...
3
by: Jason E. Trout | last post by:
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...
4
by: OpticTygre | last post by:
I have a windows service, and a separate desktop application used to configure settings for the service. I'd also like to use the windows application as a sort of debug, or notification window, to...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
3
by: Tony Clark | last post by:
Hi, I am creating a network application and want to use SOAP messages to communicate between clients (I am not consuming a web service!!), does anyone know of any good tutorials (or sample code)...
7
by: D. Patrick | last post by:
I need to duplicate the functionality of a java applet, and how it connects to a remote server. But, I don't have the protocol information or the java source code which was written years ago. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.