Saturday, March 24, 2012

SmtpClient Asynch

I need to send an email from a page's code behind. I wondered if I can use
SendAsynch and then response.redirect to a confirmation page without having
to worry about the message.Dispose() method. Is this bad practice?Not necessarily. Because it implements IDispose, the Garbage Collector will
dispose it.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"Dabbler" <Dabbler@.discussions.microsoft.com> wrote in message
news:EC381249-E44E-43D2-A608-1F13FEEED6E5@.microsoft.com...
>I need to send an email from a page's code behind. I wondered if I can use
> SendAsynch and then response.redirect to a confirmation page without
> having
> to worry about the message.Dispose() method. Is this bad practice?

0 comments:

Post a Comment