Mail.dll .NET email component samples
IMAP component for .NET
- Receive unseen emails using IMAP
- Get new emails using IMAP
- Get common email fields (Subject, Text) with IMAP
- How to access email's To, Cc and Bcc fields
- Use TLS/SSL with IMAP
- Use TLS 1.2 with IMAP
- Save all attachments to disk using IMAP
- Save images embedded in HTML email to disk using IMAP
- Download email attachments in .NET
- Delete email messages with IMAP
- Mark emails as read using IMAP
- Peek message on IMAP server
- Get email information from IMAP (fast)
- Download parts of email message
- Access custom email header using IMAP
- How to search IMAP in .NET
- Thread emails using IMAP
- Uploading emails using IMAP
- IMAP IDLE: instant push email notifications
- Free Yahoo! Mail via IMAP
- Issue a custom command to IMAP server
- Unique ID in IMAP protocol
- Get supported server extensions (IMAP, POP3, SMTP)
- Get supported authentication methods (IMAP, POP3, SMTP)
IMAP - folders
- List all folders using IMAP
- Folder management using IMAP (create, delete, rename)
- Access different folder than INBOX using IMAP
- Common IMAP folders
- Move emails to different folder with IMAP
- Access shared/delegate mailbox of Exchange Server
- Access shared/delegate mailbox of Office 365
- Get shared/public folders from IMAP
- LIST, XLIST and LSUB
IMAP - Gmail
- Enable IMAP in Gmail
- Download emails from Gmail
- Delete email permanently in Gmail
- Archive email in Gmail
- Localized Gmail IMAP folders
- Gmail extensions in Mail.dll
- Get Gmail thread id
- Search Gmail thread id
- Get Gmail message id
- Search Gmail message id
- Search Gmail using Gmail's search syntax
- List all Gmail labels
- Label message with Gmail label
- Label message with Gmail system label (e.g. Starred)
- Get Gmail labels for specified messages
- Search Gmail label
- Search unanswered emails in Gmail
- Create Gmail's url-ID via IMAP
- Detect Gmail's 2-step authentication
- Using App Passwords with Gmail
Gmail and OAuth 2.0
- OAuth 2.0 with Gmail over IMAP for web applications
- OAuth 2.0 with Gmail over IMAP for installed applications
- OAuth 2.0 with Gmail over IMAP for service account
- Get Google contacts with OAuth 2.0
Office 365 / Exchange Online
Office 365 / Exchange Online / Outlook.com and OAuth 2.0
- OAuth 2.0 with Office365/Exchange Online - IMAP/POP3/SMTP
- OAuth 2.0 web flow with Office365/Exchange Online - IMAP/POP3/SMTP
- OAuth 2.0 password grant with Office365/Exchange IMAP/POP3/SMTP
- OAuth 2.0 device flow with Office365/Exchange IMAP/POP3/SMTP
- OAuth 2.0 client credential flow with Office365/Exchange IMAP/POP3
POP3 component for .NET
- Receive emails using POP3
- Get common email fields (Subject, Text) with POP3
- Access To, Cc, Bcc fields
- Get email headers using POP3 (TOP command)
- Access custom email header using POP3
- Use TLS/SSL with POP3
- Use TLS 1.2 with POP3
- Download email attachments in .NET
- Save all attachments to disk using POP3
- Save images embedded in HTML email to disk using POP3
- Delete emails with POP3
- Receive unseen emails using POP3
- Login to POP3 server in using APOP
- Issue a custom command to POP3 server
- Unique ID in POP3 protocol
- Get supported server extensions (IMAP, POP3, SMTP)
- Get supported authentication methods (IMAP, POP3, SMTP)
POP3 - Gmail
SMTP component for .NET
- Send email
- Send HTML email
- Send email to multiple recipients
- Send email without SMTP Server (DNS Lookup)
- Email template engine
- Send email with attachment
- Sending email with embedded image
- Sending VERP (Variable Envelope Return Path) messages
- Use TLS/SSL with SMTP
- Use TLS 1.2 with SMTP
- Send email using fluent interface
- Send email with custom header
- Send raw data (*.eml file)
- Upload email to Sent folder after sending
- High priority emails
- Requesting read receipt
- Requesting Delivery Status Notifications (DSN)
- Get supported server extensions (IMAP, POP3, SMTP)
- Get supported authentication methods (IMAP, POP3, SMTP)
- Read system.net/mailSettings/smtp settings from web.config
Message Delivery Notifications (MDNs)
SMIME and DKIM (signing, validation, encryption, decryption)
- Send signed email using S/MIME
- Send encrypted email using S/MIME
- Send signed email using S/MIME (SHA-512)
- Send encrypted email using S/MIME (AES-256)
- Validate S/MIME emails
- Decrypt S/MIME emails
- Send signed email and receive encrypted
- Sign emails with DKIM
- Import certificate, private or public keys (PEM, CER, PFX)
iCalendar, vCalendar, vCard
- Send iCalendar meeting requests
- Send iCalendar recurring meeting requests
- Send iCalendar meeting requests for different timezone
- Send iCalendar recurring meeting requests for different timezone
- Receive iCalendar meeting request
- Send vCard business card
- Receive vCard business card
- HTML formatted content in the description field of an iCalendar
Videos
Other tools
Common
- Logging in Mail.dll
- Remove attachments from email
- Replace attachments in email message
- Accessing Imap, Pop3 or Smtp via HTTP or SOCKS proxy
- Reply to an email
- Forward an email
- Forward an email as a attachment
- Extract plain text from HTML email
- Create HTML from plain text email
- How to process emails embedded as attachments
- Save raw eml file using IMAP and POP3
- POP3 vs IMAP
- Default ports for email protocols
- Specify different port for POP3, SMTP or IMAP
- SSL vs TLS vs STARTTLS and STLS
- Download emails with SQLServer
- Display HTML email in windows application
Most common problems
- A connection attempt failed
- Received an unexpected EOF or 0 bytes from the transport stream
- The remote certificate is invalid according to the validation procedure
- The handshake failed due to an unexpected packet format
- Tried to read a line. Only '' received
- Could not load file or assembly ProtocolEx
- Copy to public folder: "There is no replica for that mailbox on this server."
- .chm file is not displayed correctly
- Unblock .dll file