Monday, July 21, 2008

Sending Mails using AOSMTPLib

Firstly Install ansmptp.exe :

Source Code:

using AOSMTPLib;

AOSMTPLib.MailClass oSmtp = new AOSMTPLib.MailClass();


oSmtp.FromAddr = "sunichand2000@yahoo.co.in";
oSmtp.AddRecipient("Support Team", "sunichand2000@gmail.com", 0);

oSmtp.Subject = "Test";
oSmtp.BodyText = "Hello, this is a test....";

if (oSmtp.SendMail() == 0)
{
Response.Write("Message delivered!");
}
else
{
Response.Write(oSmtp.GetLastErrDescription());
}

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...