smsohan / MvcMailer

A Mailer for ASP.Net MVC that forms the Email Body using MVC Views (Razor etc.) following Ruby on Rails ActionMailer style
MIT License
582 stars 178 forks source link

Configure with Google apps #100

Closed diyanpenkov closed 11 years ago

diyanpenkov commented 11 years ago

Hi I'm using MvcMailer and it is great. With my local smtp server it works but the i decide to use google's one. The problem is that I'm using google apps. This is the configuration in web.config file

<smtp from="info@somedomain.com" >
        <network enableSsl="true" defaultCredentials="false" host="smtp.gmail.com" port="587" userName="info@somedomain.com"  password="somepassword" />
      </smtp>

and always I revice "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required." what is wrong or did I miss something

Thanks in advice

smsohan commented 11 years ago

It looks like a user name/password issue. Are you sure the values used are right?

diyanpenkov commented 11 years ago

Thanks for the quick response. I'm not sure is it wrong username or passowrd. According to this link https://support.google.com/mail/answer/78799?hl=en I can use my Google Apps user. ALso I tried with port 465 but I receive time out exception.

diyanpenkov commented 11 years ago

smsohan, you are right. It was wrong user name. Every thing is working