Skip to content

EmailSettings

Phil Huhn edited this page May 11, 2024 · 2 revisions

Table of Contents

Assembly: MimeKit.Extensions

Class: MimeKit.NSG.EmailSettings

AppSetting.json tree


Properties

SmtpHost

Host name of the SMTP server or relay.

Examples ' smtp.gmail.com smtp.mail.yahoo.com

SmtpPort

An integer port number. Simple Mail Transfer Protocol (SMTP) used port 25. SMTP should use port 587 � this is the port for encrypted email transmissions using SMTP Secure (SMTPS). Port 465 is also used sometimes for SMTPS. However, this is an outdated implementation and port 587 should be used if possible.

  • Port Description
  • 25 Unsecured
  • 465 Secured with SSL
  • 587 Secured TLS

SmtpSecureOption

Enum value for SMTP SecureSocketOptions.

  • Enum Value
  • None 0
  • Auto 1
  • SslOnConnect 2
  • StartTls 3
  • StartTlsWhenAvailable 4

IMapHost

Host name of the IMAP server or relay.

Examples ' imap.gmail.com imap.mail.yahoo.com

IMapPort

An integer port number of the IMAP server.

  • Port Description
  • 143 Unsecured
  • 993 Secured port over TLS/SSL

IMapSecureOption

Enum value of SecureSocketOptions for IMAP protocol.

  • Enum Value
  • None 0
  • Auto 1
  • SslOnConnect 2
  • StartTls 3
  • StartTlsWhenAvailable 4

InBox

Email providers name for in-box mail folder

SentBox

Email providers name for sent mail folder

UserName

Connect to the SMTP host with this userName.

UserEmail

Connect to the SMTP host with this e-mail address.

Password

Connect to the email host with app password or user password. Most likely a 16 letter app password

Methods

ToString()

Override the default 'to string' with the actual values of the instance.