Hello, I've made a fork of this project to implement Amazon SES. I've used Mandrill implementation as base. I get error when I try send two different emails from same object. Example:
var emailService = new EmailController();
emailService.SendMailToUser(data).Deliver();
emailService.SendMailToAdmin(data).Deliver();
The error is in MailAttribute class, in SendGrid in lines 170:
foreach (var view in mail.AlternateViews)
{
using (var reader = new StreamReader(view.ContentStream))
error: '(((System.Net.Mail.AttachmentBase)(view)).ContentStream)' threw an exception of type 'System.ObjectDisposedException'
The view.ContentStream is not readable in the second call (SendMailToAdmin) but it works flawlessly with de first call. I've searched in the code without result. I don't know the issue origin, the RazorEngine or ActionMailerNext.
Hello, I've made a fork of this project to implement Amazon SES. I've used Mandrill implementation as base. I get error when I try send two different emails from same object. Example:
var emailService = new EmailController(); emailService.SendMailToUser(data).Deliver(); emailService.SendMailToAdmin(data).Deliver();
The error is in MailAttribute class, in SendGrid in lines 170: foreach (var view in mail.AlternateViews) { using (var reader = new StreamReader(view.ContentStream))
error: '(((System.Net.Mail.AttachmentBase)(view)).ContentStream)' threw an exception of type 'System.ObjectDisposedException'
The view.ContentStream is not readable in the second call (SendMailToAdmin) but it works flawlessly with de first call. I've searched in the code without result. I don't know the issue origin, the RazorEngine or ActionMailerNext.
Thanks in advance.
PD: My Amazon implementation can be found here: https://github.com/tokp/ActionMailerNext/tree/master/src/ActionMailerNext/Implementations/Amazon