Google Email Client using .Net framework 4.0

287 views Asked by At

I have created a gmail client using host as smtp.gmail.com and configures all the requires credentials and settings.

I have tested the client by hosting it in my local IIS. It worked great.

Then I hosted the project on public server and tested the client. here I am facing the problem that google stopping the signin and i received a mail saying that "Suspicious sign in prevented".

I have given a strong password and fully qualified email address. still I am getting the same problem.

what might be the cause for problem ?

here is my config file.

<?xml version="1.0"?>
<configuration>
  <system.net>
    <mailSettings>
      <smtp from="[email protected]">
        <network defaultCredentials="false" host="smtp.gmail.com" port="587" userName="[email protected]" password="xxxxxxxxx" enableSsl="true"/>
      </smtp>
    </mailSettings>
  </system.net>
  <system.web>
    <compilation debug="false" targetFramework="4.0"/>
    <httpRuntime/>
  </system.web>
</configuration>

thanks in advance

0

There are 0 answers