Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Email

To store and send email via an SMTP address, register the server at startup and use the AlertManager.Email() call anywhere in code later.

Code

PerigeeApplication.ApplicationNoInit("Email",  (c) => {

    //Register once
    AlertManager.RegisterSMTPServer("MyName", "MyPassword", "smtp.gmail.com", 587, true);

    var em = new System.Net.Mail.MailMessage();
    em.To.Add("recipient@theirdomain.com");
    em.Body = "Hello!";
    em.Subject = "Test Email";
    AlertManager.Email(em);

});

Last updated