473,385 Members | 1,402 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.

MailMessage.Send

Just a quick question on the MailMessage class' Send function.

Does this function wait on the SMTP server actually sending the message
or does it just pass it onto the mail server and leavie it there ?

Stuart

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
6 1679
From my experiences, Send will wait on SMTP server.

"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:Oh****************@TK2MSFTNGP12.phx.gbl...
Just a quick question on the MailMessage class' Send function.

Does this function wait on the SMTP server actually sending the message
or does it just pass it onto the mail server and leavie it there ?

Stuart

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
Hi,

I think it depends of the configuration of the server. Send just return
when it complete the SMTP "conversation"

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:Oh****************@TK2MSFTNGP12.phx.gbl...
Just a quick question on the MailMessage class' Send function.

Does this function wait on the SMTP server actually sending the message
or does it just pass it onto the mail server and leavie it there ?

Stuart

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #3
U mean wait until the message is sent ?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4
You are correct. Send will only return when it has gotten a SUCCESS or
FAILURE.
The message will not be put on a queue somewhere. Although you can make your
application to put them in a queue.

-Landi

"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:O9****************@TK2MSFTNGP15.phx.gbl...
U mean wait until the message is sent ?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #5
How would i go about that as i need the message only to be queued not
wait until the message goes ?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #6
Stuart,
The only thing that I would suggest doing is to put the Send part into a
thread and in that thread do retries or put it in an error log or file
somewhere where you can later go and retry them. Or you can implement your
own queue. If you use localhost (IIS SMTP server) as your SMTP server then I
think that that will insert errors into the error folder under mail. There
is also a queue folder in there but I don't know much about IIS and its SMTP
server and how that works. Maybe someone know a little more about this.

--Landi

"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:uR****************@TK2MSFTNGP14.phx.gbl...
How would i go about that as i need the message only to be queued not
wait until the message goes ?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #7

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

Similar topics

5
by: Simran | last post by:
I need to set up an automated email system , which means users should not be able to respond back to the emails but at the same time, we need to track bounced emails. This is important as our...
4
by: vineetbatta | last post by:
I am using MailMessage class of .NET framework ..... I have a scenerio in which i need to send mail to large number if users > 10,000 users..... I know i can do ...... MailMessage msg = new...
3
by: Mike P | last post by:
Can the MailMessage class be used to send emails from a machine that has no email account (such as Outlook)? Mike *** Sent via Developersdex http://www.developersdex.com *** Don't just...
1
by: Trond A. S. Andersen | last post by:
Hi all, I'm working on a project in which i need to send mail attachments in the form of Excel documents from a .NET C# application. I've written a class which creates the Excel document using...
4
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
4
by: Mark Rae | last post by:
Hi, Can anyone please tell me if it's possible to pass a System.Web.Mail.MailMessage object to a ASP.NET Web Service? Maybe using XML Serialization / Deserialization? I've been asked to...
3
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
5
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
2
by: =?Utf-8?B?Q2FwdGFpbiBEYXZlIQ==?= | last post by:
I wrote some code to send an email with two alternate views: 1) html 2) plain text All the html enabled email clients accept the html just fine and disregard the plain text version. However,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.