Don’t use “using” here. You are destroying the memory stream immediately after calling SendAsync, e.g. probably before SMTP gets to read it (since it’s async). Destroy your stream in the callback.
More Related Contents:
- How can I get my webapp’s base URL in ASP.NET MVC?
- New asp.net charting controls – will they work with MVC (eventually)?
- ASP.NET MVC – Getting QueryString values
- How to create a CheckBoxListFor extension method in ASP.NET MVC?
- Using scripts in a master page with ASP.NET MVC
- ASP.Net MVC Redirect To A Different View
- How do I solve an AntiForgeryToken exception that occurs after an iisreset in my ASP.Net MVC app?
- Integrate existing ASP.NET MVC application with Orchard CMS
- Invalid postback or callback argument. Event validation is enabled using ”
- Fake DbContext of Entity Framework 4.1 to Test
- Override Authorize Attribute in ASP.NET MVC
- Return XML from a controller’s action in as an ActionResult?
- “The resource cannot be found.” error when there is a “dot” at the end of the url
- MVC4 HTTP Error 403.14 – Forbidden
- Encrypting Connection String in web.config
- I’m lost. What happened to ASP.NET MVC 5?
- You must add a reference to assembly ‘netstandard, Version=2.0.0.0
- ASP.NET how to Render a control to HTML?
- Best Practices For Mapping DTO to Domain Object?
- Can’t find ADO.net Entity Data Model template in VS2017
- Where to run a duplicate check for an entity
- How to send email using default email client?
- ‘System.Net.Http.HttpContent’ does not contain a definition for ‘ReadAsAsync’ and no extension method
- input name and id changes when set runat=server
- ASP.NET Web Forms and ASP.NET Web Pages
- ASP.NET strange compilation error
- What’s the different between ASP.NET AJAX pageLoad() and JavaScript window.onload?
- How to Convert Row to Column in Linq and SQL
- What does {“d”:””} means in asp.net webservice response
- Managing complex Web.Config files between deployment environments