Tutorial by Topics: mail

A useful technique for Exchange Server administrators is to be able to send email messages via SMTP from PowerShell. Depending on the version of PowerShell installed on your computer or server, there are multiple ways to send emails via powershell. There is a native cmdlet option that is simple and easy to use. It uses the cmdlet Send-MailMessage.

Action Mailer allows you to send emails from your application using mailer classes and views. Mailers work very similarly to controllers. They inherit from ActionMailer::Base and live in app/mailers, and they have associated views that appear in app/views.

This service allows users to send emails with complete control over the content of the email. Unlike GmailApp, MailApp's sole purpose is sending email. MailApp cannot access a user's Gmail inbox.

Changes to scripts written using GmailApp are more likely to trigger a re-authorization request from a user than MailApp scripts.

As with web development, it's good to provide some reset CSS to the emails. As when building a web page, adding a CSS reset to an email helps to normalize how the code gets rendered across multiple email clients (since each has it's own default styles and way of interpreting code).

Currently .Net Core does not include support to send emails like System.Net.Mail from .Net. MailKit project (which is available on nuget) is a nice library for this purpose.

Page 1 of 2