Skip to content

What is NLS Mailer?


NLS Mailer is an ActiveX DLL Library that simplifies the process of sending emails by integrating multiple email services into a single, easy-to-use object. This tool allows users to automate email sending tasks in VBA applications without needing to manage the details of each email service API.


The NLS Mailer Workflow

The central object in the NLS Mailer library is the application object. This object is tasked with handling accounts as well as creating items. Once you have instantiated your application, the next step is creating an account.

Currently, we provide two integrations, Mailgun and MS Graph API, with more in the works. Using one of these integrations, you would take the data from Mailgun/Graph API (e.g. api key, tenant id, etc.) and place them into your account object, along with what type of account it is.

Once your account object is created, you can create a MailItem. This is a close replica of Microsoft's MailItem object, where you can handle creating your email(s). Once prepared, we have a custom preview pane where you can display your email as is and edit it through a GUI, or you can send it directly.

Here is a minimal demonstration:

vba
Dim MailerApp As nlsMailer.Application
Set MailerApp = New nlsMailer.Application

MailerApp.Accounts.Add SMTPAddress:="test@example.com", _
                        ApiKey:="api-key-0123456789", _
                        ApiUrl:="https://apiUrl.com", _
                        AccountType:=olMailgun

Dim newMail As nlsMailer.MailItem
Set newMail = MailerApp.CreateItem(olMailItem)

newMail.Subject = "Test"
newMail.HTMLBody = "<b>Bold</b> <i>Italic</i>"
newMail.Recipients.Add "recipient@example.com"
newMail.Attachments.Add "C:\Users\User\Downloads\Download.jpg"
newMail.Send



Where Do I Start?

If you're new to NLS Mailer, we recommend following the Get Started sequence of articles. This will show you how to:

  • Create an account in Mailgun or Graph API
  • Create your first NLS Mailer module
  • Learn how to customize NLS Mailer to your own needs