I want to use C# do to a necessary mass emailing of hundreds of receiving email addresses. I have a gmail account and I believe my message will be better received if it comes from my personal gmail account instead of from one of my website's email accounts. But if I do not resolve this issue, I might resort to trying something else.

A youtube tutorial for setting up a C# program for sending GMail messages has instructed me to first set up two tier authentication. So I did that. Then this tutorial suggested that I use a special feature in the Google Account Settings of creating an App ID with a unique 16 character special password. If you like, I can add more specifics and content about this and post a link to the youtube tutorial.

It did not work and the line of code where, after I set up the parameters of a message, I use the SMTP command to send the message an error is thrown.

It almost seems that there is so much security protocols surrounding GMail now that Google has made it virtually impossible for someone to write a C# program to make tasks easier.

On the other hand, I have an active Email server, Thunderbird, that I use. So there must be a correct way to use Gmail in a desktop App and I assume a software developer can write a program to do what I am wanting to accomplish.

I have developed my own custom tool that I can use to pare out youtube searches. They are displayed on my website, likablelogic.org. I mention this because the first item in the list on https://www.likablelogic.org/cs_email_program_with_gmail.html is the tutorial I used. After I try to find an answer to this issur on web forums, I will give other tutorials in this list a try.

There are many traps and pitfalls to using gmail. So many that you should be aware going in and I can't possibly write about all of the traps. Find the article "Sending emails using Gmail in C# On February 01, 2024 by Dzenana Kajtaz Technical Content Writer @Mailtrap" because from my reading it looks complete and not out of date.

Good luck.

Consider a third-party email API like SendGrid or explore other options like Outlook SMTP. Check the other tutorials you mentioned; there may be a simpler approach.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.