[Gambas-user] SmtpClient Vs GMail

Benoît Minisini g4mba5 at gmail.com
Wed Jan 31 21:17:56 CET 2018


Le 31/01/2018 à 21:10, Franco a écrit :
> 
> 
> Il 31/01/2018 18:59, T Lee Davidson ha scritto:
>> Try setting SmtpClient.Debug = True so you can see the exchange with 
>> the SMTP server as it happens.
> Thanks Lee for the time you dedicated to me.
> I was already aware of Google's restrictions on its mail server.
> obviously the SendMail component calls the default mail client, in my 
> case Thunderbird, which already has the right settings for GMail.
> On the other hand, SmtpClient works well with another account that does 
> not use OAuth2 as authentication.
> The only difference is graphic, with SmtpClient you can create an 
> interface is more streamlined and simpler, as well as faster, 
> Thunderbird intervenes with its GUI, a little more "cumbersome".
> But I do not find it right that Google indicates as less secure app all 
> those not "Brand", perhaps to discourage ...?
> Please note that I am using an "automatic" Google translator to respond, 
> so I hope there are no involuntary "nonsense".
> Thanks again, a dear greeting to you.
> vigiot
> 

I have already sent mails through Google SMTP server, and it worked the 
last time I tried:

Dim hMsg As New SmtpClient

hMsg.Debug = True
hMsg.To.Add(...)
hMsg.Subject = "Test mail"
hMsg.Add("Something\n")
hMsg.From = "benoit.minisini at gmail.com"
hMsg.Host = "smtp.gmail.com"
hMsg.Encrypt = Net.TLS
hMsg.User = "benoit.minisini at gmail.com"
hMsg.Password = "*****"

hMsg.Send()

-- 
Benoît Minisini


More information about the User mailing list