Email Providers

Step 1:

Step 2 :

            string userName = "userName ";
            string password = "password ";
            var data = SmtpConfig.ForSendGrid(userName, password);
            SmtpEmailProvider obj = new SmtpEmailProvider(data);
            var email = new Email()
            {
                ReceiverName = "ReceiverName ",
                ToAddress = "ToAddress @domain.com",
                SenderName = "SenderName",
                FromAddress = "FromAddress @domain.com",
                Message = "Message ",
                Subject = "Subject ",
                IsHtmlEmail = false 
            };
            var re = obj.Send(email);
There are many Smtp setting available.
  • ForGoDaddy
  • ForGmail
  • ForOutlook
  • ForMailGun
  • ForSendGrid

Happy Coding... :)

Comments