# 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

```csharp
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);

});
```
