Code keeps running to the point where it throws me an exception

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 881 Views - Last Post: 03 April 2017 - 07:49 PM Rate Topic: -----

#16 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 16481
  • View blog
  • Posts: 65,328
  • Joined: 12-June 08

Re: Code keeps running to the point where it throws me an exception

Posted 03 April 2017 - 09:47 AM

Oh for peter's sake - if it is that difficult then use the SMTP namespace for .NET. Bing, bang, boom.
Was This Post Helpful? 0
  • +
  • -

#17 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7915
  • View blog
  • Posts: 26,430
  • Joined: 05-May 12

Re: Code keeps running to the point where it throws me an exception

Posted 03 April 2017 - 07:49 PM

modi123_1: LOL! But by logging in using SMTP, he's only going to effectively log on to the server for the session to send email. He's still not going to get the effect he wants which is to cause the web page that he is hosting in his web browser control to get logged in. :)

gooby31: There is no C# library or API to get that login to happen within your hosted web browser control. There maybe some Javascript libraries that will assist your in working with the OAuth that Google uses so that you can login, but those libraries also assume that you are actually writing some kind of web application that uses data coming from Google. They are not really geared towards what you are trying to do.

In fact, trying to create a mail client the way you are trying to do things is the completely wrong way to do things. Imagine what happens when you lose your Internet connection. Does that mean that your user can't read any of the his old mail or compose any new mail while waiting for the connection to get restored? Have you considered what your application do when you run it at a public wifi location where there is an initial logon or EULA page from the hotspot provider before you get to the GMail web UI?
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2