Skip to content

Email

With the EmailHook class, you can send emails to your intended recipients, be it plain text or rich HTML.

Key Features:

  • Flexibility: Send both plain text and rich HTML emails.
  • Secure Connection: Option to utilize SSL for secure SMTP server connections.
  • Customizable: Define subject, sender's display name, attachments, and more.
  • Asynchronous Operations: Email delivery that doesn't block your operations.

To start sending emails, you'll first need the host and port details of your email server. Here's a list of common email service providers to help you out:

Gmail:

Host: smtp.gmail.com
Port: 587

Outlook:

Host: smtp.office365.com 
Port: 587 

Example

EmailHook emailNotifier = new EmailHook(smtpServer, senderEmail, 
    senderPassword, recipientEmail);
emailNotifier.SendAsync("Hello from HookHarbor!");