tags:

views:

393

answers:

2

Considering that SmtpClient has a SendAsync method which I'm not using, is it safe therefore to assume the StmpClient.Send is synchronous? I'm using it to send an email with temporary file attachment and want to know whether I can delete the temporary attachment immediately afterwards.

Thanks, Rob.

+1  A: 

Yes it's synchronous.

Joseph
+4  A: 

From the msdn documentation: "Sends an e-mail message to an SMTP server for delivery. These methods block while the message is being transmitted.".

So yes it's synchronous.

jeroenh