473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Send an email from a Web Service without having an SMTP server.

I want to send an email from my web service.

I do not want to act like an email client, giving credentials of an existing
email account to send messages: I would like to send my mail directly to an
SMTP server like if I am myself an SMTP server that is forwarding a mail.

What classes can be used on .NET FW 2?
Thanks,
Luigi.
Jun 11 '07 #1
3 2853
On Jun 11, 11:05 pm, "BLUE" <bluewrote:
I want to send an email from my web service.

I do not want to act like an email client, giving credentials of an existing
email account to send messages: I would like to send my mail directly to an
SMTP server like if I am myself an SMTP server that is forwarding a mail.

What classes can be used on .NET FW 2?

Thanks,
Luigi.
We can use MailMessage class. See http://www.developer.com/net/net/article.php/3511731

But we need to provide the host name, I mean the mailserver name.

Jun 11 '07 #2
On Jun 11, 9:05 pm, "BLUE" <bluewrote:
I want to send an email from my web service.

I do not want to act like an email client, giving credentials of an existing
email account to send messages: I would like to send my mail directly to an
SMTP server like if I am myself an SMTP server that is forwarding a mail.

What classes can be used on .NET FW 2?

Thanks,
Luigi.
Hi,

I don't think you can avoid connection to an existing SMTP server.
Email forwarding is made by an SMTP server...

If you don't want to be an SMTP server and send mails at the same
time, it's not possible.

If you have an SMTP server to send the mail with, use the
System.Net.Mail namespace MailMessage & SmtpClient classes to deliver
mail messages.
Otherwise, if you want to implement an SMTP server, you should follow
the RFC for SMTP servers and the section of email forwarding.

Hope this helps.
Moty

Jun 11 '07 #3
Using mx1.mail.yahoo.com my message is refused: is there an SMTP with wich
to try?
I'm not sure SmtpClient do not behave like an email client: smtp servers
send messages all over the world without authenticating each other.
If I set UseDefaultCredentials to true
System.Net.CredentialCache.DefaultCredentials are sent, but how can I see
what credentials are sent?
I've seen GetCredential, but I do not know how to set the parameters.
Thanks,
Luigi.
Jun 12 '07 #4

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

Similar topics

11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
6
by: John J. Hughes II | last post by:
I have a service that needs to send e-mail alerts. I have been attempting to use the System.Net.Mail function from .NET but this seems to require the IIS be installed and running. Since some of...
1
by: michi | last post by:
Hi there.... Got here a tricky thing with my SMTP. First I show you what works on my machine.. **This Works** SmtpMail.SmtpServer = "mail.gmx.net" <-gmx is my mail provider...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
3
by: rob | last post by:
I have an win form app from which I want to be able to send bug reports. My first approach was something like: SmtpClient client = new SmtpClient( ????? ); MailAddress from = new...
4
by: CLEAR-RCIC | last post by:
I want to send an email from our Intranet site to myself whenever an error happens. Our manager will not let us install SMTP on the web server. Is it possible to send email programatically...
11
by: hazz | last post by:
smtpClient.Send(message) is causing me problems as per specifics in the trace below. Email is sent but not without this error typically upon sending the second email, but sometimes when running...
5
by: Sin Jeong-hun | last post by:
Hi. I would like to let users send bug reports or other messages to me. Maybe the easiest way to send e-mails from my application is just use the default e-mail agent by executing a link...
2
by: btcoder | last post by:
Hi, my jsp page uses sun.net.smtp.SmtpClient to send email. It worked fine until the hosted location was moved to another server. Now it generates the sun.net.smtp.SmtpProtocolException and the...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.