- Print
- DarkLight
- PDF
How can I use the Gmail mail server from Google from C# / NedFox software?
In this case, the SMTP server of Gmail can be used. In the .Config file, at least the following AppSettings should be specified:
<add key="SmtpServer" value="smtp.gmail.com"/>
<add key="SmtpUsername" value="username@gmail.com"/>
<add key="SmtpPassword" value="password"/
Of course, the email address associated with the Gmail account should be provided for username@gmail.com. And instead of the text 'password', the actual password should be provided.
However, Google has recently blocked the use of their mail server for external applications by default. The following link should be used to allow less secure apps to access the Gmail SMTP server:
https://www.google.com/settings/security/lesssecureapps
Furthermore, this functionality is only available in updates of our software after January 11, 2017, as it includes an adjustment regarding the sending of the username and password.