Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GMail
1.
https://myaccount.google.com/lesssecureapps -> Allow apps that use less secure sign-in
2.
var Sender = new GMailSender("yourmail@gmail.com", "password");

Sender.Failed += () => Console.WriteLine("Failed");
Sender.Sended += () => Console.WriteLine("Sended");

Sender.SendAsync("Title", "Message", "recipient@anymail.com", Attachment.FromFile(@"Photo.jpg"));

Console.ReadKey();

­

­

You can also sends from ...
AOL, Mail(mail.com), Outlook, Yahoo, Yandex, Zoho

­

­

Or create your own ...
public sealed class YellowMailSender : Sender
{
    #region Constructors
      public YellowMailSender(string Login, string Password)
          : base(587, "smtp.yellow-mail.com", Login, Password)
      { }
    #endregion
}
... for AOL
 Account Security -> Allow apps that use less secure sign-in

­

... for GMail
 https://myaccount.google.com/lesssecureapps  -> Allow apps that use less secure sign-in

­

... for Mail
 you do not have to do anything

­

... for Outlook
 account must be registered / validated

­

... for Yahoo
 Account Security -> Allow apps that use less secure sign-in

­

... for Yandex
 you do not have to do anything

­

... for Zoho
 you do not have to do anything
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.