ProtoCUS
ProtoCUS

Reputation: 49

MVCMailer not sending MVC4

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="[email protected]">
            <network enableSsl="true" host="smtp.gmail.com" port="587" userName="[email protected]" 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("[email protected]");
        });
    }

The _Layout for Mailer is Under Views/UserMailer

Any help please ?? THanks

Upvotes: 1

Views: 258

Answers (0)

Related Questions