Giter Site home page Giter Site logo

aim's Introduction

Build Status

Aegis Implicit Mail (AIM)

Aegis Implicit Mail is a free and open source library which is designed to provide fast and developer friendly API to send emails using SMTP ports.

In this fork I change TargetFramework to net48 for my old project.

Why AIM

Sadly, Microsoft.Net.Mail Ssl Mails does not support Implicit Ssl Mail and it is still used by many servers, including port 465 of Gmail here AIM comes to make a readable and fast alternative to send your smtp mails.

Download

Binaries are available in the form of NuGet package

Getting the Code

To get a local copy of the current code, clone it using git:

$ git clone https://github.com/nilnull/AIM.git

Write the code!

If you want to have a sample SMTP mailing, you can write your program exactly like the way you write using System.Net.Mail

 private void SendEmail()
 {
     var mail = "[email protected]";
     var host = "smtp.gmail.com";
     var user = "yourUserName";
     var pass = "yourPassword";
     
     //Generate Message 
     var mymessage = new MimeMailMessage();
     mymessage.From = new MimeMailAddress(mail);
     mymessage.To.Add(mail);
     mymessage.Subject = "test";
     mymessage.Body = "body";
     
     //Create Smtp Client
     var mailer = new MimeMailer(host, 465);
     mailer.User= user;
     mailer.Password = pass;
     mailer.SslType = SslMode.Ssl;
     mailer.AuthenticationMode = AuthenticationType.Base64;
     
     //Set a delegate function for call back
     mailer.SendCompleted += compEvent;
     mailer.SendMailAsync(mymessage);
 }

 //Call back function
 private void compEvent(object sender, AsyncCompletedEventArgs e)
 {
     if (e.UserState!=null)
         Console.Out.WriteLine(e.UserState.ToString());
     
     Console.Out.WriteLine("is it canceled? " + e.Cancelled);

     if (e.Error != null)
             Console.Out.WriteLine("Error : " + e.Error.Message);
 }

As you might be familiar with System.Net.Mail, we have four important objects in sending mails:

  1. Mail Message
  2. Addresses
  3. Attachment
  4. sender

For each mail you need to generate mail message,

  1. Set addresses
  2. Add attachments
  3. Send it using a smtp sender

AIM uses the same architecture. We have normal (mime) Mails and smime Mails that can be in a plain sender or Ssl Sender in addition Ssl Sender can be implicit and explicit.

More information can be found at our wiki

Features

  • Support for both of S-MIME and Mime Messages
  • Easy to use and well designed, easy to migrate from System.Net.Mail
  • Support for Signed and/or encrypted mail
  • Supports Ssl Type detection (Detects if Mail server is using Implicit (SSL) or Explicit (TLS) smtp)
  • Support Base64, PlainText and default credential Authentication
  • Asynchronous Mail Sending
  • Support None Ssl Mails
  • Support Inline and Attached Attachments.
  • Signed and Encrypted attachments
  • Fast and reliable
  • Made by developers for developers
  • Test Connection Settings
  • Auto Detection of Ssl Type
  • Support Office 365
  • Support display name

Archive

Please check our archive here

Development Team

AIM is delivered by NilNull from PKI.Tools with special thanks to those who help us :

  • Eugene Jenihov
  • Dénes Gál-Szász
  • galdenny

aim's People

Contributors

nilnull avatar mwidev avatar araztln avatar maverick1983 avatar davidezanella avatar psikola avatar eugene-zen avatar brightsoul avatar carlosbet avatar galdenny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.