West Wind Internet and Client Tools
SMTP using Gmail on server 2008 R2
Gravatar is a globally recognized avatar based on your email address. SMTP using Gmail on server 2008 R2
  Hendrik
  All
  Jun 25, 2020 @ 02:15am

Hi Rick.

Hope you have some ideas regarding this problem. I am using West Wind Client Tools Version 6.17

I have started getting problems using Gmail accounts on a Windows Server 2008 R8 to send emails.

I have ensured that security option on google account allow less secure apps.

Getting the message when sending an email.

My code is working on server 2012 and newer. Also working on Windows 10. All servers newest updates in use.

Tested and installed newest .Net Return values from GetwwDotnetBridge() below.

Any ideas where I can continue looking thanks

Gravatar is a globally recognized avatar based on your email address. re: SMTP using Gmail on server 2008 R2
  Rick Strahl
  Hendrik
  Jun 25, 2020 @ 03:13pm

Could be a TLS 1.2 issue. Google and others have stopped supporting older TLS 1.x versions and server 2008 by default doesn't support it out of the box. However if you're using wwSmtp in .NET that shouldn't matter since it's using the .NET Core runtime's TLS settings. However, it's possible on that old version that the newer protocols are not enabled.

You might try this with the latest version (which since then has explicitly enabled TLS 1.2). You can try it out with the shareware version...

More info here:

Web Connection and TLS 1.2 Support

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: SMTP using Gmail on server 2008 R2
  Hendrik
  Hendrik
  Jun 25, 2020 @ 11:53pm

Thank you Rick.

I did download the shareware version and tried the Gmail settings.

No Success.

Changed the Emails account to use an Outlook.com email and it works great even with the older Dotnetbridge.dll.

Could this be something relating elsewhere to Gmail. I did allow for less secure application so that should not be a problem.

Below the Shareware version and also the TLS check screenshots

Gravatar is a globally recognized avatar based on your email address. re: SMTP using Gmail on server 2008 R2
  Rick Strahl
  Hendrik
  Jun 26, 2020 @ 12:00am

You should probably try the Google access on another machine, preferably a Windows 10 machine to make sure your code works without any network issues. Based on that you can better determine whether the problem is a code problem or a network issue.

GMail can be a pain in the ass - they are making it harder and harder to use SMTP and I've heard they are completely removing SMTP support in the not so distant future instead requiring their APIs to send mail remotely...

But it does work - I just tested here and it works for me on Windows 10.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: SMTP using Gmail on server 2008 R2
  Hendrik
  Hendrik
  Jun 26, 2020 @ 02:30am

I have tested on Windows 10, Server 2012, Server 2019 where it is working

Only on Server 2008 (GMAIL) does not work (OUTLOOK Email) Works

Gravatar is a globally recognized avatar based on your email address. re: SMTP using Gmail on server 2008 R2
  Rick Strahl
  Hendrik
  Jun 26, 2020 @ 05:27pm

Yeah I don't know. I can't imagine what the problem could be if you're on .NET 4.8 since that will send the right certificate format. Make 100% sure that you are in fact setting the SSL flag and you are passing the correct user name and password on the 2008 machine. Write a test program you can run independently of your application to validate that the exact same code is used on both the Windows 10 (or whatever other working environment) and where it's breaking. And I mean EXACT same - using the same accounts and connections etc. Just to be sure this isn't some type or account difference.

Based on the error message it seems like the username and password is not getting sent...

All that said - Server 2008 is very old and the TLS 1.2 issues are a potential issue. Looks like you have all the right settings (note that you have to reboot after you change those TLS settings).

+++ Rick ---

© 1996-2024