Похожие чаты

Hi. Does anyone have a full tutorial on how to use

gmail API to send an email in ASP?
The documentation is so bad when it comes to c# SDK.
I want to know, how to authorize the account, use the credentials, and send the email.
I created the OAuth creds in GCloud platform. I just need the coding steps.

6 ответов

7 просмотров
Adnan-Al_Beda Автор вопроса

I want this cause SMTP is obsolete. I can use app password with 2FA enabled, but I want to do it 'the right way'

Adnan Al_Beda
I want this cause SMTP is obsolete. I can use app ...

https://mailtrap.io/blog/csharp-send-email/#:~:text=Well%2C%20according%20to%20Microsoft%20and,classes%20is%20a%20better%20alternative.

Adnan-Al_Beda Автор вопроса
Mr Thieves
https://mailtrap.io/blog/csharp-send-email/#:~:tex...

I read that, not what I'm looking for. If I want to use a SaaS, I'd use SendGrid instead.

Adnan Al_Beda
I read that, not what I'm looking for. If I want ...

in this sample i don't see anything other than how to use gmail to send mail with c#. using System; using MailKit.Net.Smtp; using MailKit; using MimeKit; namespace TestClient { class Program { public static void Main (string[] args) { var email = new MimeMessage(); email.From.Add(new MailboxAddress("Sender Name", "sender@email.com")); email.To.Add(new MailboxAddress("Receiver Name", "receiver@email.com")); email.Subject = "Testing out email sending"; email.Body = new TextPart(MimeKit.Text.TextFormat.Html) { Text = "<b>Hello all the way from the land of C#</b>" }; using (var smtp = new SmtpClient()) { smtp.Connect("smtp.server.address", 587, false); // Note: only needed if the SMTP server requires authentication smtp.Authenticate("smtp_username", "smtp_password"); smtp.Send(email); smtp.Disconnect(true); } } } }

Adnan-Al_Beda Автор вопроса
Adnan Al_Beda
It's using smtp, not Google sdk

smtp from their own library not from microsoft that is obsolute using MailKit.Net.Smtp;

Похожие вопросы

Обсуждают сегодня

А кто-то пробовал, уезжая из Эстонии получить э-рез и продолжить вести предпринимательскую деятельность внутри Эстонии, используя свой OÜ?
Lalalashechki Lalala
57
@MrMiscipitlick А можешь макрос написать, который будет вычислять смещение относительно переданных меток? Просто .label1-.label2, и вернуть значение.
КТ315
35
@samkazemian - couple questions: Update on frxBTC? - This would do well with the current influx of institutional investment entering the space Update on future veFXS streams...
Costi
16
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
Does anyone here have a connection Mullvad? it would be nice to know what it would take to have them accept BCH 0-conf.
tl121x
16
Подобного рода ;Следующие три строки это директивы ассемблера, ;которые можно не задавать, т.к.работаем в Visual Studio. ;Символ ";" - это начало однострочного комментария ...
Егор Анелькин
3
Can an XMR transaction be tracked from its sender to its receiver by performing blockchain analysis, no matter how many addresses are used?
Trkz342
16
Кто-нибудь знает почему SPM клонирует репо целиком? Некоторые репы просто огромные, как та же swift-syntax которая нужна для использования макросов. Сначала подумал, что это...
iMike
6
I arrived here after a Chico Crypto show highlighted the project & the Team - the fact that the Team had a long history of successfully working with household names gave me e...
Banter is Bullish
5
Карта сайта