1

I'm using MVCMailer to send email, when I sent the email I don't have any error message everything pass correctly,

I'm folowwing these steps :

https://github.com/smsohan/MvcMailer/wiki/MvcMailer-Step-by-Step-Guide What I found strange is that I put a different password and I didn't go any error message.

Do you have any idea how I can Catch errors with MVC Mailer

<system.net>
<mailSettings>
<smtp from="MyMail@gmail.com">
            <network enableSsl="true" host="smtp.gmail.com" port="587" userName="MyMail@gmail.com" password="111111" />
        </smtp>
</mailSettings>

the only difference is that I 'm calling the mailer from the HomeController depending on condition :

 IUserMailer mailer = new UserMailer();
 mailer.SendOrder();

UserMailer Class

public virtual MvcMailMessage SendOrder()
    {
        //ViewBag.Data = someObject;
        return Populate(x =>
        {
            x.Subject = "SendOrder";
            x.ViewName = "SendOrder";
            x.To.Add("MyMail@gmail.com");
        });
    }

The _Layout for Mailer is Under Views/UserMailer

Any help please ?? THanks

ProtoCUS
  • 49
  • 2
  • 13

0 Answers0