agentleFS
Sign inSign up

agentic-net-examples / working-with-smtp-client

aspose-email/agentic-net-examples/working-with-smtp-client/AGENTS.md

C# examples for working-with-smtp-client using Aspose.Email for .NET

AGENTS.md2 starsChanged 5 months ago
---
name: working-with-smtp-client
description: C# examples for working-with-smtp-client using Aspose.Email for .NET
language: csharp
framework: net8.0
parent: ../AGENTS.md
---

# AGENTS - working-with-smtp-client

## Persona
You are a C# developer working in the **working-with-smtp-client** category.
This folder contains standalone C# examples for this category.
See the root [AGENTS.md](../AGENTS.md) for repository-wide conventions.

## Scope
- Examples for **working-with-smtp-client**.
- Files are standalone `.cs` examples stored directly in this folder.

## Required Namespaces
- `using System;` (167 file(s))
- `using Aspose.Email;` (166 file(s))
- `using Aspose.Email.Clients.Smtp;` (136 file(s))
- `using Aspose.Email.Clients;` (84 file(s))
- `using System.IO;` (54 file(s))
- `using System.Collections.Generic;` (21 file(s))
- `using System.Net;` (19 file(s))
- `using Aspose.Email.Clients.Exchange.Dav;` (11 file(s))
- `using Aspose.Email.Mime;` (11 file(s))
- `using System.Threading;` (9 file(s))
- `using System.Text;` (8 file(s))
- `using Aspose.Email.Clients.Imap;` (5 file(s))
- `using Aspose.Email.Clients.Google;` (4 file(s))
- `using System.Net.Security;` (4 file(s))
- `using Aspose.Email.Mapi;` (4 file(s))
- `using System.Security.Cryptography.X509Certificates;` (3 file(s))
- `using System.Security.Cryptography;` (3 file(s))
- `using System.Threading.Tasks;` (3 file(s))
- `using Aspose.Email.Clients.Exchange.WebService;` (2 file(s))
- `using System.IO.Compression;` (2 file(s))
- `using System.Linq;` (2 file(s))
- `using System.Data;` (2 file(s))
- `using System.Diagnostics;` (2 file(s))
- `using System.Text.Json;` (2 file(s))
- `using Aspose.Email.Clients.DeliveryService.SendGrid;` (1 file(s))
- `using Aspose.Email.AntiSpam;` (1 file(s))
- `using System.Net.NetworkInformation;` (1 file(s))
- `using System.Net.Sockets;` (1 file(s))
- `using Aspose.Email.Clients.Base;` (1 file(s))
- `using Aspose.Email.Tools.Merging;` (1 file(s))
- `using Aspose.Email.Clients.Smtp.Models;` (1 file(s))
- `using System.Net.Http;` (1 file(s))
- `using Aspose.Email.Clients.Exchange;` (1 file(s))
- `using System.Xml.Linq;` (1 file(s))
- `using Aspose.Email.Calendar;` (1 file(s))
- `using var client = new SmtpClient(smtpHost, smtpPort, smtpUser, smtpPass);` (1 file(s))
- `using var payloadStream = new MemoryStream(payloadBytes);` (1 file(s))
- `using Aspose.Words;` (1 file(s))
- `using System.Net.Mime;` (1 file(s))
- `using System.Text.RegularExpressions;` (1 file(s))

## Files in this folder
| File | Description |
|------|-------------|
| [add-a-custom-reply-to-address-that-differs-from-the-from-address-for-handling-responses.cs](./add-a-custom-reply-to-address-that-differs-from-the-from-address-for-handling-responses.cs) | add a custom reply to address that differs from the from address for handling responses |
| [add-a-custom-x-audit-trail-header-containing-a-json-payload-with-operation-metadata.cs](./add-a-custom-x-audit-trail-header-containing-a-json-payload-with-operation-metadata.cs) | add a custom x audit trail header containing a json payload with operation metadata |
| [add-a-custom-x-campaign-id-header-to-tag-the-email-with-a-marketing-campaign-identifier.cs](./add-a-custom-x-campaign-id-header-to-tag-the-email-with-a-marketing-campaign-identifier.cs) | add a custom x campaign id header to tag the email with a marketing campaign identifier |
| [add-a-custom-x-compliance-tag-header-to-indicate-regulatory-compliance-category-for-the-email.cs](./add-a-custom-x-compliance-tag-header-to-indicate-regulatory-compliance-category-for-the-email.cs) | add a custom x compliance tag header to indicate regulatory compliance category for the email |
| [add-a-custom-x-correlation-id-header-to-correlate-the-email-with-related-system-events.cs](./add-a-custom-x-correlation-id-header-to-correlate-the-email-with-related-system-events.cs) | add a custom x correlation id header to correlate the email with related system events |
| [add-a-custom-x-delivery-token-header-containing-a-guid-to-uniquely-identify-each-send-attempt.cs](./add-a-custom-x-delivery-token-header-containing-a-guid-to-uniquely-identify-each-send-attempt.cs) | add a custom x delivery token header containing a guid to uniquely identify each send attempt |
| [add-a-custom-x-environment-header-to-indicate-whether-the-email-is-sent-from-development-staging-or-production.cs](./add-a-custom-x-environment-header-to-indicate-whether-the-email-is-sent-from-development-staging-or-production.cs) | add a custom x environment header to indicate whether the email is sent from development staging or production |
| [add-a-custom-x-feedback-id-header-to-capture-user-feedback-identifiers-for-later-analysis.cs](./add-a-custom-x-feedback-id-header-to-capture-user-feedback-identifiers-for-later-analysis.cs) | add a custom x feedback id header to capture user feedback identifiers for later analysis |
| [add-a-custom-x-mail-client-header-indicating-the-version-of-the-sending-application.cs](./add-a-custom-x-mail-client-header-indicating-the-version-of-the-sending-application.cs) | add a custom x mail client header indicating the version of the sending application |
| [add-a-custom-x-mailing-group-header-to-group-related-messages-for-downstream-processing-pipelines.cs](./add-a-custom-x-mailing-group-header-to-group-related-messages-for-downstream-processing-pipelines.cs) | add a custom x mailing group header to group related messages for downstream processing pipelines |
| [add-a-custom-x-message-source-header-indicating-the-originating-system-for-traceability-and-debugging.cs](./add-a-custom-x-message-source-header-indicating-the-originating-system-for-traceability-and-debugging.cs) | add a custom x message source header indicating the originating system for traceability and debugging |
| [add-a-custom-x-notification-type-header-to-differentiate-between-alert-and-informational-messages.cs](./add-a-custom-x-notification-type-header-to-differentiate-between-alert-and-informational-messages.cs) | add a custom x notification type header to differentiate between alert and informational messages |
| [add-a-custom-x-priority-header-with-value-1-to-mark-the-email-as-highest-importance.cs](./add-a-custom-x-priority-header-with-value-1-to-mark-the-email-as-highest-importance.cs) | add a custom x priority header with value 1 to mark the email as highest importance |
| [add-a-custom-x-spam-score-header-based-on-content-analysis-before-transmitting-the-email.cs](./add-a-custom-x-spam-score-header-based-on-content-analysis-before-transmitting-the-email.cs) | add a custom x spam score header based on content analysis before transmitting the email |
| [add-a-custom-x-support-ticket-header-linking-the-email-to-a-support-case-identifier.cs](./add-a-custom-x-support-ticket-header-linking-the-email-to-a-support-case-identifier.cs) | add a custom x support ticket header linking the email to a support case identifier |
| [add-a-custom-x-trace-id-header-generated-from-a-distributed-tracing-system-for-end-to-end-monitoring.cs](./add-a-custom-x-trace-id-header-generated-from-a-distributed-tracing-system-for-end-to-end-monitoring.cs) | add a custom x trace id header generated from a distributed tracing system for end to end monitoring |
| [add-a-custom-x-user-id-header-to-associate-the-email-with-an-internal-user-identifier.cs](./add-a-custom-x-user-id-header-to-associate-the-email-with-an-internal-user-identifier.cs) | add a custom x user id header to associate the email with an internal user identifier |
| [add-a-high-priority-header-to-an-outgoing-message-before-transmitting-via-the-smtp-client.cs](./add-a-high-priority-header-to-an-outgoing-message-before-transmitting-via-the-smtp-client.cs) | add a high priority header to an outgoing message before transmitting via the smtp client |
| [add-a-list-unsubscribe-header-to-enable-recipients-to-opt-out-directly-from-the-email-client.cs](./add-a-list-unsubscribe-header-to-enable-recipients-to-opt-out-directly-from-the-email-client.cs) | add a list unsubscribe header to enable recipients to opt out directly from the email client |
| [add-a-read-receipt-request-header-to-the-outgoing-message-to-track-when-recipients-open-it.cs](./add-a-read-receipt-request-header-to-the-outgoing-message-to-track-when-recipients-open-it.cs) | add a read receipt request header to the outgoing message to track when recipients open it |
| [adjust-operation-timeout-based-on-network-latency-measurements-to-avoid-unnecessary-email-delivery-delays.cs](./adjust-operation-timeout-based-on-network-latency-measurements-to-avoid-unnecessary-email-delivery-delays.cs) | adjust operation timeout based on network latency measurements to avoid unnecessary email delivery delays |
| [adjust-smtpclient-timeout-dynamically-based-on-email-size-to-prevent-premature-termination.cs](./adjust-smtpclient-timeout-dynamically-based-on-email-size-to-prevent-premature-termination.cs) | adjust smtpclient timeout dynamically based on email size to prevent premature termination |
| [apply-a-content-filter-that-removes-prohibited-words-from-the-email-body-before-sending.cs](./apply-a-content-filter-that-removes-prohibited-words-from-the-email-body-before-sending.cs) | apply a content filter that removes prohibited words from the email body before sending |
| [apply-a-custom-certificate-validation-callback-to-accept-self-signed-certificates-during-tls-handshake.cs](./apply-a-custom-certificate-validation-callback-to-accept-self-signed-certificates-during-tls-handshake.cs) | apply a custom certificate validation callback to accept self signed certificates during tls handshake |
| [apply-a-custom-dkim-signing-routine-to-the-message-before-transmitting-via-the-smtp-client.cs](./apply-a-custom-dkim-signing-routine-to-the-message-before-transmitting-via-the-smtp-client.cs) | apply a custom dkim signing routine to the message before transmitting via the smtp client |
| [apply-a-custom-email-address-normalization-routine-to-standardize-case-and-remove-display-names.cs](./apply-a-custom-email-address-normalization-routine-to-standardize-case-and-remove-display-names.cs) | apply a custom email address normalization routine to standardize case and remove display names |
| [apply-a-retry-policy-that-attempts-to-resend-a-failed-message-up-to-three-times-with-exponential-backoff.cs](./apply-a-retry-policy-that-attempts-to-resend-a-failed-message-up-to-three-times-with-exponential-backoff.cs) | apply a retry policy that attempts to resend a failed message up to three times with exponential backoff |
| [attach-a-pdf-document-from-a-memory-stream-to-an-email-and-transmit-it-using-tls-encryption.cs](./attach-a-pdf-document-from-a-memory-stream-to-an-email-and-transmit-it-using-tls-encryption.cs) | attach a pdf document from a memory stream to an email and transmit it using tls encryption |
| [authenticate-to-the-smtp-server-using-cram-md5-by-setting-authenticationtype-property.cs](./authenticate-to-the-smtp-server-using-cram-md5-by-setting-authenticationtype-property.cs) | authenticate to the smtp server using cram md5 by setting authenticationtype property |
| [bind-the-smtp-client-to-a-specific-local-ip-address-using-bindipendpoint.cs](./bind-the-smtp-client-to-a-specific-local-ip-address-using-bindipendpoint.cs) | bind the smtp client to a specific local ip address using bindipendpoint |
| [bind-the-smtp-client-to-the-ipv6-address-of-the-host-machine-for-dual-stack-compatibility.cs](./bind-the-smtp-client-to-the-ipv6-address-of-the-host-machine-for-dual-stack-compatibility.cs) | bind the smtp client to the ipv6 address of the host machine for dual stack compatibility |
| [configure-a-maximum-attachment-size-limit-of-10-mb-and-reject-oversized-files-before-sending.cs](./configure-a-maximum-attachment-size-limit-of-10-mb-and-reject-oversized-files-before-sending.cs) | configure a maximum attachment size limit of 10 mb and reject oversized files before sending |
| [configure-a-socks-proxy-with-username-and-password-to-authenticate-the-client-before-establishing-smtp-connection.cs](./configure-a-socks-proxy-with-username-and-password-to-authenticate-the-client-before-establishing-smtp-connection.cs) | configure a socks proxy with username and password to authenticate the client before establishing smtp connection |
| [configure-smtpclient-proxy-with-a-socks5-server-to-route-email-traffic-securely.cs](./configure-smtpclient-proxy-with-a-socks5-server-to-route-email-traffic-securely.cs) | configure smtpclient proxy with a socks5 server to route email traffic securely |
| [configure-smtpclient-to-automatically-select-the-most-secure-authentication-method-from-the-server-supported-list.cs](./configure-smtpclient-to-automatically-select-the-most-secure-authentication-method-from-the-server-supported-list.cs) | configure smtpclient to automatically select the most secure authentication method from the server supported list |
| [configure-smtpclient-to-fallback-to-plain-authentication-if-cram-md5-is-not-supported-by-the-server.cs](./configure-smtpclient-to-fallback-to-plain-authentication-if-cram-md5-is-not-supported-by-the-server.cs) | configure smtpclient to fallback to plain authentication if cram md5 is not supported by the server |
| [configure-smtpclient-to-use-a-socks-proxy-with-authentication-credentials-for-secure-access.cs](./configure-smtpclient-to-use-a-socks-proxy-with-authentication-credentials-for-secure-access.cs) | configure smtpclient to use a socks proxy with authentication credentials for secure access |
| [configure-smtpclient-to-use-cram-md5-authentication-only-when-the-server-advertises-it.cs](./configure-smtpclient-to-use-cram-md5-authentication-only-when-the-server-advertises-it.cs) | configure smtpclient to use cram md5 authentication only when the server advertises it |
| [configure-smtpclient-with-a-60-second-operation-timeout-for-large-email-batches.cs](./configure-smtpclient-with-a-60-second-operation-timeout-for-large-email-batches.cs) | configure smtpclient with a 60 second operation timeout for large email batches |
| [configure-smtpclient-with-host-port-and-security-settings-then-send-an-email-loaded-from-an-msg-file.cs](./configure-smtpclient-with-host-port-and-security-settings-then-send-an-email-loaded-from-an-msg-file.cs) | configure smtpclient with host port and security settings then send an email loaded from an msg file |
| [configure-socket-timeout-to-30-seconds-to-prevent-hanging-connections-during-smtp-transmission.cs](./configure-socket-timeout-to-30-seconds-to-prevent-hanging-connections-during-smtp-transmission.cs) | configure socket timeout to 30 seconds to prevent hanging connections during smtp transmission |
| [configure-the-client-to-automatically-add-a-date-header-with-utc-time-if-missing.cs](./configure-the-client-to-automatically-add-a-date-header-with-utc-time-if-missing.cs) | configure the client to automatically add a date header with utc time if missing |
| [configure-the-client-to-automatically-add-a-list-id-header-for-mailing-list-identification.cs](./configure-the-client-to-automatically-add-a-list-id-header-for-mailing-list-identification.cs) | configure the client to automatically add a list id header for mailing list identification |
| [configure-the-client-to-automatically-add-a-list-unsubscribe-post-header-for-one-click-unsubscribe-support.cs](./configure-the-client-to-automatically-add-a-list-unsubscribe-post-header-for-one-click-unsubscribe-support.cs) | configure the client to automatically add a list unsubscribe post header for one click unsubscribe support |
| [configure-the-client-to-automatically-add-a-message-id-header-if-one-is-not-already-present.cs](./configure-the-client-to-automatically-add-a-message-id-header-if-one-is-not-already-present.cs) | configure the client to automatically add a message id header if one is not already present |
| [configure-the-client-to-automatically-compress-attachments-larger-than-1-mb-using-gzip-before-sending.cs](./configure-the-client-to-automatically-compress-attachments-larger-than-1-mb-using-gzip-before-sending.cs) | configure the client to automatically compress attachments larger than 1 mb using gzip before sending |
| [configure-the-client-to-automatically-remove-any-duplicate-recipients-from-the-to-cc-and-bcc-lists.cs](./configure-the-client-to-automatically-remove-any-duplicate-recipients-from-the-to-cc-and-bcc-lists.cs) | configure the client to automatically remove any duplicate recipients from the to cc and bcc lists |
| [configure-the-client-to-automatically-remove-any-empty-recipient-fields-to-prevent-smtp-errors-during-send.cs](./configure-the-client-to-automatically-remove-any-empty-recipient-fields-to-prevent-smtp-errors-during-send.cs) | configure the client to automatically remove any empty recipient fields to prevent smtp errors during send |
| [configure-the-client-to-automatically-retry-sending-when-encountering-transient-4xx-smtp-error-codes.cs](./configure-the-client-to-automatically-retry-sending-when-encountering-transient-4xx-smtp-error-codes.cs) | configure the client to automatically retry sending when encountering transient 4xx smtp error codes |
| [configure-the-client-to-automatically-strip-html-tags-from-the-body-when-sending-to-plain-text-only-recipients.cs](./configure-the-client-to-automatically-strip-html-tags-from-the-body-when-sending-to-plain-text-only-recipients.cs) | configure the client to automatically strip html tags from the body when sending to plain text only recipients |
| [configure-the-client-to-reuse-a-single-smtp-connection-for-sending-a-batch-of-fifty-messages.cs](./configure-the-client-to-reuse-a-single-smtp-connection-for-sending-a-batch-of-fifty-messages.cs) | configure the client to reuse a single smtp connection for sending a batch of fifty messages |
| [configure-the-client-to-use-a-specific-tls-protocol-version-such-as-tls-1-2-for-secure-connections.cs](./configure-the-client-to-use-a-specific-tls-protocol-version-such-as-tls-1-2-for-secure-connections.cs) | configure the client to use a specific tls protocol version such as tls 1 2 for secure connections |
| [configure-the-smtp-client-to-ignore-certificate-revocation-checks-for-testing-environments.cs](./configure-the-smtp-client-to-ignore-certificate-revocation-checks-for-testing-environments.cs) | configure the smtp client to ignore certificate revocation checks for testing environments |
| [configure-the-smtp-client-to-use-a-connection-timeout-of-10-seconds-and-a-read-timeout-of-30-seconds.cs](./configure-the-smtp-client-to-use-a-connection-timeout-of-10-seconds-and-a-read-timeout-of-30-seconds.cs) | configure the smtp client to use a connection timeout of 10 seconds and a read timeout of 30 seconds |
| [configure-the-smtp-client-to-use-a-custom-dns-resolver-that-prefers-ipv6-over-ipv4-addresses.cs](./configure-the-smtp-client-to-use-a-custom-dns-resolver-that-prefers-ipv6-over-ipv4-addresses.cs) | configure the smtp client to use a custom dns resolver that prefers ipv6 over ipv4 addresses |
| [configure-the-smtp-client-to-use-a-custom-retry-interval-of-15-seconds-between-each-resend-attempt.cs](./configure-the-smtp-client-to-use-a-custom-retry-interval-of-15-seconds-between-each-resend-attempt.cs) | configure the smtp client to use a custom retry interval of 15 seconds between each resend attempt |
| [configure-the-smtp-client-to-use-a-proxy-server-for-routing-all-email-traffic-securely.cs](./configure-the-smtp-client-to-use-a-proxy-server-for-routing-all-email-traffic-securely.cs) | configure the smtp client to use a proxy server for routing all email traffic securely |
| [configure-the-smtp-client-to-use-a-specific-authentication-realm-when-connecting-to-the-server.cs](./configure-the-smtp-client-to-use-a-specific-authentication-realm-when-connecting-to-the-server.cs) | configure the smtp client to use a specific authentication realm when connecting to the server |
| [configure-the-smtp-client-to-use-a-specific-local-ip-address-for-outbound-connections.cs](./configure-the-smtp-client-to-use-a-specific-local-ip-address-for-outbound-connections.cs) | configure the smtp client to use a specific local ip address for outbound connections |
| [configure-the-smtp-client-to-use-a-specific-network-interface-for-outbound-traffic-on-multi-homed-servers.cs](./configure-the-smtp-client-to-use-a-specific-network-interface-for-outbound-traffic-on-multi-homed-servers.cs) | configure the smtp client to use a specific network interface for outbound traffic on multi homed servers |
| [configure-the-smtp-client-to-use-ntlm-authentication-with-domain-credentials-for-secure-login.cs](./configure-the-smtp-client-to-use-ntlm-authentication-with-domain-credentials-for-secure-login.cs) | configure the smtp client to use ntlm authentication with domain credentials for secure login |
| [configure-the-smtpclient-s-log-level-to-detailed-to-aid-troubleshooting-when-transmitting-msg-format-emails.cs](./configure-the-smtpclient-s-log-level-to-detailed-to-aid-troubleshooting-when-transmitting-msg-format-emails.cs) | configure the smtpclient s log level to detailed to aid troubleshooting when transmitting msg format emails |
| [configure-the-smtpclient-to-log-smtp-operations-by-specifying-a-logfile-path-and-loglevel-during-msg-email-loading.cs](./configure-the-smtpclient-to-log-smtp-operations-by-specifying-a-logfile-path-and-loglevel-during-msg-email-loading.cs) | configure the smtpclient to log smtp operations by specifying a logfile path and loglevel during msg email loading |
| [create-a-template-engine-that-replaces-placeholders-with-user-data-before-sending-the-email.cs](./create-a-template-engine-that-replaces-placeholders-with-user-data-before-sending-the-email.cs) | create a template engine that replaces placeholders with user data before sending the email |
| [create-an-email-from-an-msg-file-using-mailmessage-then-transmit-it-via-smtpclient.cs](./create-an-email-from-an-msg-file-using-mailmessage-then-transmit-it-via-smtpclient.cs) | create an email from an msg file using mailmessage then transmit it via smtpclient |
| [create-an-smtp-client-using-configuration-extracted-from-an-msg-file-and-transmit-the-email.cs](./create-an-smtp-client-using-configuration-extracted-from-an-msg-file-and-transmit-the-email.cs) | create an smtp client using configuration extracted from an msg file and transmit the email |
| [enable-delivery-status-notifications-for-success-failure-and-delay-events-on-each-outgoing-email.cs](./enable-delivery-status-notifications-for-success-failure-and-delay-events-on-each-outgoing-email.cs) | enable delivery status notifications for success failure and delay events on each outgoing email |
| [enable-detailed-smtp-activity-logging-and-write-the-log-entries-to-a-rotating-file-system.cs](./enable-detailed-smtp-activity-logging-and-write-the-log-entries-to-a-rotating-file-system.cs) | enable detailed smtp activity logging and write the log entries to a rotating file system |
| [enable-keep-alive-on-the-smtp-connection-to-reduce-handshake-overhead-for-consecutive-messages.cs](./enable-keep-alive-on-the-smtp-connection-to-reduce-handshake-overhead-for-consecutive-messages.cs) | enable keep alive on the smtp connection to reduce handshake overhead for consecutive messages |
| [enable-smtp-communication-logging-for-email-transmission-specifying-logfile-and-loglevel-settings-with-an-msg-source.cs](./enable-smtp-communication-logging-for-email-transmission-specifying-logfile-and-loglevel-settings-with-an-msg-source.cs) | enable smtp communication logging for email transmission specifying logfile and loglevel settings with an msg source |
| [enable-smtp-pipelining-to-send-multiple-commands-without-waiting-for-individual-server-responses.cs](./enable-smtp-pipelining-to-send-multiple-commands-without-waiting-for-individual-server-responses.cs) | enable smtp pipelining to send multiple commands without waiting for individual server responses |
| [enable-smtp-protocol-logging-and-transmit-an-email-message-loaded-from-an-msg-file.cs](./enable-smtp-protocol-logging-and-transmit-an-email-message-loaded-from-an-msg-file.cs) | enable smtp protocol logging and transmit an email message loaded from an msg file |
| [enable-ssl-tls-encryption-on-smtpclient-by-setting-securityoptions-to-sslexplicit.cs](./enable-ssl-tls-encryption-on-smtpclient-by-setting-securityoptions-to-sslexplicit.cs) | enable ssl tls encryption on smtpclient by setting securityoptions to sslexplicit |
| [enable-starttls-negotiation-on-port-587-to-upgrade-an-insecure-connection-to-a-secure-channel.cs](./enable-starttls-negotiation-on-port-587-to-upgrade-an-insecure-connection-to-a-secure-channel.cs) | enable starttls negotiation on port 587 to upgrade an insecure connection to a secure channel |
| [enable-tls-1-2-by-setting-securityoptions-to-sslexplicit-and-verify-server-certificate-chain.cs](./enable-tls-1-2-by-setting-securityoptions-to-sslexplicit-and-verify-server-certificate-chain.cs) | enable tls 1 2 by setting securityoptions to sslexplicit and verify server certificate chain |
| [forward-a-loaded-msg-mailmessage-to-additional-recipients-by-calling-the-mailmessage-forward-method-preserving-original-content.cs](./forward-a-loaded-msg-mailmessage-to-additional-recipients-by-calling-the-mailmessage-forward-method-preserving-original-content.cs) | forward a loaded msg mailmessage to additional recipients by calling the mailmessage forward method preserving original content |
| [forward-an-existing-message-to-multiple-recipients-while-preserving-original-headers-and-attachments.cs](./forward-an-existing-message-to-multiple-recipients-while-preserving-original-headers-and-attachments.cs) | forward an existing message to multiple recipients while preserving original headers and attachments |
| [implement-a-callback-that-logs-the-time-taken-for-each-smtp-command-execution.cs](./implement-a-callback-that-logs-the-time-taken-for-each-smtp-command-execution.cs) | implement a callback that logs the time taken for each smtp command execution |
| [implement-a-fallback-mechanism-that-switches-to-an-alternate-smtp-host-if-the-primary-server-fails.cs](./implement-a-fallback-mechanism-that-switches-to-an-alternate-smtp-host-if-the-primary-server-fails.cs) | implement a fallback mechanism that switches to an alternate smtp host if the primary server fails |
| [implement-a-feature-that-compresses-the-entire-mime-message-using-gzip-before-sending-over-smtp.cs](./implement-a-feature-that-compresses-the-entire-mime-message-using-gzip-before-sending-over-smtp.cs) | implement a feature that compresses the entire mime message using gzip before sending over smtp |
| [implement-a-feature-that-logs-the-size-of-each-attachment-before-it-is-added-to-the-email.cs](./implement-a-feature-that-logs-the-size-of-each-attachment-before-it-is-added-to-the-email.cs) | implement a feature that logs the size of each attachment before it is added to the email |
| [implement-a-feature-that-validates-spf-records-for-the-sending-domain-before-attempting-smtp-delivery.cs](./implement-a-feature-that-validates-spf-records-for-the-sending-domain-before-attempting-smtp-delivery.cs) | implement a feature that validates spf records for the sending domain before attempting smtp delivery |
| [implement-a-logging-interceptor-that-records-the-size-of-each-email-payload-before-transmission.cs](./implement-a-logging-interceptor-that-records-the-size-of-each-email-payload-before-transmission.cs) | implement a logging interceptor that records the size of each email payload before transmission |
| [implement-a-mechanism-that-encrypts-attachments-using-aes-before-adding-them-to-the-email.cs](./implement-a-mechanism-that-encrypts-attachments-using-aes-before-adding-them-to-the-email.cs) | implement a mechanism that encrypts attachments using aes before adding them to the email |
| [implement-a-mechanism-that-encrypts-the-smtp-session-using-starttls-only-after-verifying-server-certificate-fingerpri.cs](./implement-a-mechanism-that-encrypts-the-smtp-session-using-starttls-only-after-verifying-server-certificate-fingerpri.cs) | implement a mechanism that encrypts the smtp session using starttls only after verifying server certificate fingerpri |
| [implement-a-mechanism-that-logs-the-smtp-server-banner-message-upon-establishing-the-connection.cs](./implement-a-mechanism-that-logs-the-smtp-server-banner-message-upon-establishing-the-connection.cs) | implement a mechanism that logs the smtp server banner message upon establishing the connection |
| [implement-a-mechanism-that-pauses-sending-when-the-server-returns-a-421-response-then-resumes-after-delay.cs](./implement-a-mechanism-that-pauses-sending-when-the-server-returns-a-421-response-then-resumes-after-delay.cs) | implement a mechanism that pauses sending when the server returns a 421 response then resumes after delay |
| [implement-a-mechanism-that-queues-messages-locally-when-the-smtp-server-is-unreachable-then-retries-later.cs](./implement-a-mechanism-that-queues-messages-locally-when-the-smtp-server-is-unreachable-then-retries-later.cs) | implement a mechanism that queues messages locally when the smtp server is unreachable then retries later |
| [implement-a-method-that-checks-server-supported-authentication-mechanisms-and-selects-the-strongest-available-option.cs](./implement-a-method-that-checks-server-supported-authentication-mechanisms-and-selects-the-strongest-available-option.cs) | implement a method that checks server supported authentication mechanisms and selects the strongest available option |
| [implement-a-policy-that-rejects-sending-messages-larger-than-25-mb-to-comply-with-server-limits.cs](./implement-a-policy-that-rejects-sending-messages-larger-than-25-mb-to-comply-with-server-limits.cs) | implement a policy that rejects sending messages larger than 25 mb to comply with server limits |
| [implement-a-progress-reporter-that-updates-after-each-email-is-successfully-transmitted-over-smtp.cs](./implement-a-progress-reporter-that-updates-after-each-email-is-successfully-transmitted-over-smtp.cs) | implement a progress reporter that updates after each email is successfully transmitted over smtp |
| [implement-a-retry-delay-that-respects-the-smtp-server-retry-after-header-when-present.cs](./implement-a-retry-delay-that-respects-the-smtp-server-retry-after-header-when-present.cs) | implement a retry delay that respects the smtp server retry after header when present |
| [implement-a-retry-policy-that-increases-greetingtimeout-after-each-failed-connection-attempt.cs](./implement-a-retry-policy-that-increases-greetingtimeout-after-each-failed-connection-attempt.cs) | implement a retry policy that increases greetingtimeout after each failed connection attempt |
| [implement-a-retry-strategy-that-respects-the-server-retry-after-header-and-backs-off-exponentially.cs](./implement-a-retry-strategy-that-respects-the-server-retry-after-header-and-backs-off-exponentially.cs) | implement a retry strategy that respects the server retry after header and backs off exponentially |
| [implement-a-watchdog-that-aborts-the-smtp-send-operation-if-it-exceeds-a-configurable-time-limit.cs](./implement-a-watchdog-that-aborts-the-smtp-send-operation-if-it-exceeds-a-configurable-time-limit.cs) | implement a watchdog that aborts the smtp send operation if it exceeds a configurable time limit |
| [implement-a-watchdog-that-monitors-smtp-server-response-times-and-raises-alerts-if-they-exceed-thresholds.cs](./implement-a-watchdog-that-monitors-smtp-server-response-times-and-raises-alerts-if-they-exceed-thresholds.cs) | implement a watchdog that monitors smtp server response times and raises alerts if they exceed thresholds |
| [implement-asynchronous-email-sending-with-cancellation-token-support-to-allow-graceful-abort-of-the-operation.cs](./implement-asynchronous-email-sending-with-cancellation-token-support-to-allow-graceful-abort-of-the-operation.cs) | implement asynchronous email sending with cancellation token support to allow graceful abort of the operation |
| [implement-credential-validation-logic-that-attempts-a-silent-login-before-sending-any-message-to-ensure-correctness.cs](./implement-credential-validation-logic-that-attempts-a-silent-login-before-sending-any-message-to-ensure-correctness.cs) | implement credential validation logic that attempts a silent login before sending any message to ensure correctness |
| [implement-dns-cache-to-store-mx-lookup-results-for-ten-minutes-reducing-lookup-latency.cs](./implement-dns-cache-to-store-mx-lookup-results-for-ten-minutes-reducing-lookup-latency.cs) | implement dns cache to store mx lookup results for ten minutes reducing lookup latency |
| [implement-event-handlers-that-log-smtp-server-responses-after-each-command-issued-by-the-client.cs](./implement-event-handlers-that-log-smtp-server-responses-after-each-command-issued-by-the-client.cs) | implement event handlers that log smtp server responses after each command issued by the client |
| [implement-parallel-sending-of-a-list-of-messages-using-multiple-smtp-client-instances-for-improved-throughput.cs](./implement-parallel-sending-of-a-list-of-messages-using-multiple-smtp-client-instances-for-improved-throughput.cs) | implement parallel sending of a list of messages using multiple smtp client instances for improved throughput |
| [increase-greetingtimeout-to-ten-seconds-for-servers-known-to-have-delayed-initial-responses-during-peak-hours.cs](./increase-greetingtimeout-to-ten-seconds-for-servers-known-to-have-delayed-initial-responses-during-peak-hours.cs) | increase greetingtimeout to ten seconds for servers known to have delayed initial responses during peak hours |
| [instantiate-a-mailmessage-populate-from-to-subject-and-body-fields-from-an-msg-template-then-dispatch-using-smtpclient.cs](./instantiate-a-mailmessage-populate-from-to-subject-and-body-fields-from-an-msg-template-then-dispatch-using-smtpclient.cs) | instantiate a mailmessage populate from to subject and body fields from an msg template then dispatch using smtpclient |
| [load-an-msg-file-into-a-mailmessage-instance-and-transmit-it-using-the-smtpclient-send.cs](./load-an-msg-file-into-a-mailmessage-instance-and-transmit-it-using-the-smtpclient-send.cs) | load an msg file into a mailmessage instance and transmit it using the smtpclient send |
| [load-an-msg-file-into-a-mailmessage-object-and-forward-the-message-by-invoking-its-forward-method.cs](./load-an-msg-file-into-a-mailmessage-object-and-forward-the-message-by-invoking-its-forward-method.cs) | load an msg file into a mailmessage object and forward the message by invoking its forward method |
| [load-credentials-from-an-encrypted-configuration-file-decrypt-them-then-assign-to-smtpclient.cs](./load-credentials-from-an-encrypted-configuration-file-decrypt-them-then-assign-to-smtpclient.cs) | load credentials from an encrypted configuration file decrypt them then assign to smtpclient |
| [load-smtp-authentication-credentials-from-a-json-configuration-file-using-loadcredentialsfromconfig.cs](./load-smtp-authentication-credentials-from-a-json-configuration-file-using-loadcredentialsfromconfig.cs) | load smtp authentication credentials from a json configuration file using loadcredentialsfromconfig |
| [load-smtp-credentials-from-an-xml-file-map-them-to-networkcredential-and-assign-to-smtpclient.cs](./load-smtp-credentials-from-an-xml-file-map-them-to-networkcredential-and-assign-to-smtpclient.cs) | load smtp credentials from an xml file map them to networkcredential and assign to smtpclient |
| [log-each-smtp-command-and-server-response-to-a-database-table-for-audit-purposes.cs](./log-each-smtp-command-and-server-response-to-a-database-table-for-audit-purposes.cs) | log each smtp command and server response to a database table for audit purposes |
| [query-the-smtp-server-for-available-extensions-with-getextensions-and-store-them-for-later-capability-checks.cs](./query-the-smtp-server-for-available-extensions-with-getextensions-and-store-them-for-later-capability-checks.cs) | query the smtp server for available extensions with getextensions and store them for later capability checks |
| [retrieve-and-display-the-full-list-of-smtp-server-extensions-for-diagnostic-purposes-in-a-console-application.cs](./retrieve-and-display-the-full-list-of-smtp-server-extensions-for-diagnostic-purposes-in-a-console-application.cs) | retrieve and display the full list of smtp server extensions for diagnostic purposes in a console application |
| [retrieve-and-log-supported-authentication-methods-from-the-mail-server-using-getsupportedauthenticationmethods.cs](./retrieve-and-log-supported-authentication-methods-from-the-mail-server-using-getsupportedauthenticationmethods.cs) | retrieve and log supported authentication methods from the mail server using getsupportedauthenticationmethods |
| [retrieve-server-extensions-and-conditionally-enable-starttls-if-the-starttls-extension-is-present.cs](./retrieve-server-extensions-and-conditionally-enable-starttls-if-the-starttls-extension-is-present.cs) | retrieve server extensions and conditionally enable starttls if the starttls extension is present |
| [retrieve-server-extensions-and-store-them-in-a-dictionary-for-quick-lookup-during-email-composition.cs](./retrieve-server-extensions-and-store-them-in-a-dictionary-for-quick-lookup-during-email-composition.cs) | retrieve server extensions and store them in a dictionary for quick lookup during email composition |
| [send-a-calendar-invitation-icalendar-as-an-alternative-view-attached-to-the-email-message.cs](./send-a-calendar-invitation-icalendar-as-an-alternative-view-attached-to-the-email-message.cs) | send a calendar invitation icalendar as an alternative view attached to the email message |
| [send-a-message-with-a-custom-mime-boundary-to-satisfy-a-legacy-mail-system-parsing-rules.cs](./send-a-message-with-a-custom-mime-boundary-to-satisfy-a-legacy-mail-system-parsing-rules.cs) | send a message with a custom mime boundary to satisfy a legacy mail system parsing rules |
| [send-a-message-with-a-custom-mime-type-application-vnd-custom-json-for-specialized-payload-delivery.cs](./send-a-message-with-a-custom-mime-type-application-vnd-custom-json-for-specialized-payload-delivery.cs) | send a message with a custom mime type application vnd custom json for specialized payload delivery |
| [send-a-message-with-a-custom-x-auto-response-suppress-header-to-prevent-automatic-replies.cs](./send-a-message-with-a-custom-x-auto-response-suppress-header-to-prevent-automatic-replies.cs) | send a message with a custom x auto response suppress header to prevent automatic replies |
| [send-a-message-with-a-custom-x-precedence-header-set-to-bulk-for-mass-mail-campaigns.cs](./send-a-message-with-a-custom-x-precedence-header-set-to-bulk-for-mass-mail-campaigns.cs) | send a message with a custom x precedence header set to bulk for mass mail campaigns |
| [send-a-message-with-a-custom-x-priority-level-header-set-to-urgent-for-time-sensitive-notifications.cs](./send-a-message-with-a-custom-x-priority-level-header-set-to-urgent-for-time-sensitive-notifications.cs) | send a message with a custom x priority level header set to urgent for time sensitive notifications |
| [send-a-message-with-a-custom-x-retention-policy-header-specifying-how-long-the-email-should-be-retained.cs](./send-a-message-with-a-custom-x-retention-policy-header-specifying-how-long-the-email-should-be-retained.cs) | send a message with a custom x retention policy header specifying how long the email should be retained |
| [send-a-message-with-a-delayed-delivery-time-by-setting-the-date-header-to-a-future-timestamp.cs](./send-a-message-with-a-delayed-delivery-time-by-setting-the-date-header-to-a-future-timestamp.cs) | send a message with a delayed delivery time by setting the date header to a future timestamp |
| [send-a-message-with-a-large-attachment-split-into-multiple-mime-parts-using-the-message-partial-type.cs](./send-a-message-with-a-large-attachment-split-into-multiple-mime-parts-using-the-message-partial-type.cs) | send a message with a large attachment split into multiple mime parts using the message partial type |
| [send-a-message-with-a-multipart-mixed-body-that-includes-both-a-text-part-and-a-binary-attachment.cs](./send-a-message-with-a-multipart-mixed-body-that-includes-both-a-text-part-and-a-binary-attachment.cs) | send a message with a multipart mixed body that includes both a text part and a binary attachment |
| [send-a-message-with-a-multipart-related-body-that-includes-an-html-part-and-embedded-css-resources.cs](./send-a-message-with-a-multipart-related-body-that-includes-an-html-part-and-embedded-css-resources.cs) | send a message with a multipart related body that includes an html part and embedded css resources |
| [send-a-message-with-a-signed-dkim-header-generated-from-a-private-key-stored-in-a-secure-vault.cs](./send-a-message-with-a-signed-dkim-header-generated-from-a-private-key-stored-in-a-secure-vault.cs) | send a message with a signed dkim header generated from a private key stored in a secure vault |
| [send-a-message-with-an-attached-csv-file-generated-from-a-datatable-without-writing-to-disk.cs](./send-a-message-with-an-attached-csv-file-generated-from-a-datatable-without-writing-to-disk.cs) | send a message with an attached csv file generated from a datatable without writing to disk |
| [send-a-message-with-multiple-bcc-recipients-while-keeping-their-addresses-hidden-from-other-recipients.cs](./send-a-message-with-multiple-bcc-recipients-while-keeping-their-addresses-hidden-from-other-recipients.cs) | send a message with multiple bcc recipients while keeping their addresses hidden from other recipients |
| [send-a-multipart-alternative-email-that-includes-both-plain-text-and-html-versions-for-client-compatibility.cs](./send-a-multipart-alternative-email-that-includes-both-plain-text-and-html-versions-for-client-compatibility.cs) | send a multipart alternative email that includes both plain text and html versions for client compatibility |
| [send-a-plain-text-email-through-an-smtp-server-using-explicit-ssl-on-port-465.cs](./send-a-plain-text-email-through-an-smtp-server-using-explicit-ssl-on-port-465.cs) | send a plain text email through an smtp server using explicit ssl on port 465 |
| [send-an-email-with-a-compressed-zip-attachment-ensuring-the-attachment-size-does-not-exceed-5-mb.cs](./send-an-email-with-a-compressed-zip-attachment-ensuring-the-attachment-size-does-not-exceed-5-mb.cs) | send an email with a compressed zip attachment ensuring the attachment size does not exceed 5 mb |
| [send-an-email-with-a-custom-x-language-header-indicating-the-primary-language-of-the-message-content.cs](./send-an-email-with-a-custom-x-language-header-indicating-the-primary-language-of-the-message-content.cs) | send an email with a custom x language header indicating the primary language of the message content |
| [send-an-email-with-a-dynamically-generated-pdf-attachment-created-from-html-content-at-runtime.cs](./send-an-email-with-a-dynamically-generated-pdf-attachment-created-from-html-content-at-runtime.cs) | send an email with a dynamically generated pdf attachment created from html content at runtime |
| [send-an-email-with-a-dynamically-generated-qr-code-image-embedded-as-an-inline-attachment.cs](./send-an-email-with-a-dynamically-generated-qr-code-image-embedded-as-an-inline-attachment.cs) | send an email with a dynamically generated qr code image embedded as an inline attachment |
| [send-an-email-with-a-multipart-alternative-body-that-includes-both-plain-text-and-rtf-versions.cs](./send-an-email-with-a-multipart-alternative-body-that-includes-both-plain-text-and-rtf-versions.cs) | send an email with a multipart alternative body that includes both plain text and rtf versions |
| [send-an-email-with-a-multipart-mixed-body-that-includes-a-json-payload-attachment-for-api-integration.cs](./send-an-email-with-a-multipart-mixed-body-that-includes-a-json-payload-attachment-for-api-integration.cs) | send an email with a multipart mixed body that includes a json payload attachment for api integration |
| [send-an-email-with-a-multipart-mixed-body-that-includes-a-text-part-html-part-and-attachment.cs](./send-an-email-with-a-multipart-mixed-body-that-includes-a-text-part-html-part-and-attachment.cs) | send an email with a multipart mixed body that includes a text part html part and attachment |
| [send-an-email-with-a-plain-text-body-encoded-in-iso-8859-1-for-legacy-client-compatibility.cs](./send-an-email-with-a-plain-text-body-encoded-in-iso-8859-1-for-legacy-client-compatibility.cs) | send an email with a plain text body encoded in iso 8859 1 for legacy client compatibility |
| [send-an-email-with-a-plain-text-fallback-body-for-clients-that-cannot-render-html-content.cs](./send-an-email-with-a-plain-text-fallback-body-for-clients-that-cannot-render-html-content.cs) | send an email with a plain text fallback body for clients that cannot render html content |
| [send-an-email-with-a-signed-s-mime-part-to-provide-message-integrity-and-authenticity.cs](./send-an-email-with-a-signed-s-mime-part-to-provide-message-integrity-and-authenticity.cs) | send an email with a signed s mime part to provide message integrity and authenticity |
| [send-an-html-email-containing-inline-images-by-embedding-them-as-linked-resources-in-the-message.cs](./send-an-html-email-containing-inline-images-by-embedding-them-as-linked-resources-in-the-message.cs) | send an html email containing inline images by embedding them as linked resources in the message |
| [serialize-email-message-to-eml-format-before-sending-to-allow-pre-send-inspection-and-logging.cs](./serialize-email-message-to-eml-format-before-sending-to-allow-pre-send-inspection-and-logging.cs) | serialize email message to eml format before sending to allow pre send inspection and logging |
| [set-a-custom-greeting-timeout-of-three-seconds-to-speed-up-connections-to-fast-responding-mail-servers.cs](./set-a-custom-greeting-timeout-of-three-seconds-to-speed-up-connections-to-fast-responding-mail-servers.cs) | set a custom greeting timeout of three seconds to speed up connections to fast responding mail servers |
| [set-a-custom-operation-timeout-of-two-minutes-for-sending-large-attachments-to-prevent-premature-failures.cs](./set-a-custom-operation-timeout-of-two-minutes-for-sending-large-attachments-to-prevent-premature-failures.cs) | set a custom operation timeout of two minutes for sending large attachments to prevent premature failures |
| [set-a-custom-timeout-for-the-authentication-phase-to-avoid-long-waits-on-invalid-credentials.cs](./set-a-custom-timeout-for-the-authentication-phase-to-avoid-long-waits-on-invalid-credentials.cs) | set a custom timeout for the authentication phase to avoid long waits on invalid credentials |
| [set-a-custom-x-mailing-id-header-on-each-message-to-facilitate-downstream-tracking.cs](./set-a-custom-x-mailing-id-header-on-each-message-to-facilitate-downstream-tracking.cs) | set a custom x mailing id header on each message to facilitate downstream tracking |
| [set-smtpclient-greetingtimeout-to-five-seconds-to-reduce-initial-connection-latency.cs](./set-smtpclient-greetingtimeout-to-five-seconds-to-reduce-initial-connection-latency.cs) | set smtpclient greetingtimeout to five seconds to reduce initial connection latency |
| [set-smtpclient-securityoptions-to-autodetect-to-let-the-client-negotiate-the-best-encryption-protocol-automatically.cs](./set-smtpclient-securityoptions-to-autodetect-to-let-the-client-negotiate-the-best-encryption-protocol-automatically.cs) | set smtpclient securityoptions to autodetect to let the client negotiate the best encryption protocol automatically |
| [set-the-email-body-encoding-to-utf-8-to-support-international-characters-in-the-message-content.cs](./set-the-email-body-encoding-to-utf-8-to-support-international-characters-in-the-message-content.cs) | set the email body encoding to utf 8 to support international characters in the message content |
| [set-the-email-sensitivity-header-to-private-to-indicate-confidential-content-to-recipients.cs](./set-the-email-sensitivity-header-to-private-to-indicate-confidential-content-to-recipients.cs) | set the email sensitivity header to private to indicate confidential content to recipients |
| [set-the-enablessl-property-on-the-smtp-client-to-enable-ssl-before-transmitting-msg-formatted-messages.cs](./set-the-enablessl-property-on-the-smtp-client-to-enable-ssl-before-transmitting-msg-formatted-messages.cs) | set the enablessl property on the smtp client to enable ssl before transmitting msg formatted messages |
| [set-the-smtp-host-port-and-security-options-on-the-smtpclient-prior-to-transmitting-an-msg-formatted-email.cs](./set-the-smtp-host-port-and-security-options-on-the-smtpclient-prior-to-transmitting-an-msg-formatted-email.cs) | set the smtp host port and security options on the smtpclient prior to transmitting an msg formatted email |
| [set-up-an-http-proxy-for-smtpclient-proxy-to-enable-delivery-behind-corporate-firewalls.cs](./set-up-an-http-proxy-for-smtpclient-proxy-to-enable-delivery-behind-corporate-firewalls.cs) | set up an http proxy for smtpclient proxy to enable delivery behind corporate firewalls |
| [specify-a-custom-message-id-generator-that-creates-globally-unique-identifiers-for-each-sent-email.cs](./specify-a-custom-message-id-generator-that-creates-globally-unique-identifiers-for-each-sent-email.cs) | specify a custom message id generator that creates globally unique identifiers for each sent email |
| [throttle-email-sending-rate-to-no-more-than-20-messages-per-minute-to-avoid-server-limits.cs](./throttle-email-sending-rate-to-no-more-than-20-messages-per-minute-to-avoid-server-limits.cs) | throttle email sending rate to no more than 20 messages per minute to avoid server limits |
| [transmit-an-msg-email-file-through-smtp-by-configuring-smtpclient-with-sample-server-and-credential-parameters.cs](./transmit-an-msg-email-file-through-smtp-by-configuring-smtpclient-with-sample-server-and-credential-parameters.cs) | transmit an msg email file through smtp by configuring smtpclient with sample server and credential parameters |
| [use-a-custom-dns-resolver-to-locate-mx-records-for-the-recipient-domain-before-sending.cs](./use-a-custom-dns-resolver-to-locate-mx-records-for-the-recipient-domain-before-sending.cs) | use a custom dns resolver to locate mx records for the recipient domain before sending |
| [use-a-secure-socket-layer-ssl-stream-wrapper-to-encrypt-the-entire-smtp-session.cs](./use-a-secure-socket-layer-ssl-stream-wrapper-to-encrypt-the-entire-smtp-session.cs) | use a secure socket layer ssl stream wrapper to encrypt the entire smtp session |
| [use-an-http-proxy-that-requires-custom-authentication-headers-and-configure-smtpclient-proxy-accordingly.cs](./use-an-http-proxy-that-requires-custom-authentication-headers-and-configure-smtpclient-proxy-accordingly.cs) | use an http proxy that requires custom authentication headers and configure smtpclient proxy accordingly |
| [use-an-http-proxy-with-ntlm-authentication-to-send-emails-from-a-windows-domain-joined-environment.cs](./use-an-http-proxy-with-ntlm-authentication-to-send-emails-from-a-windows-domain-joined-environment.cs) | use an http proxy with ntlm authentication to send emails from a windows domain joined environment |
| [use-bindipendpoint-to-select-a-specific-network-interface-for-sending-emails-from-a-multi-homed-server.cs](./use-bindipendpoint-to-select-a-specific-network-interface-for-sending-emails-from-a-multi-homed-server.cs) | use bindipendpoint to select a specific network interface for sending emails from a multi homed server |
| [use-smtpclient-to-authenticate-to-the-smtp-server-with-basic-ntlm-or-oauth2-credentials-when-sending-an-msg-email.cs](./use-smtpclient-to-authenticate-to-the-smtp-server-with-basic-ntlm-or-oauth2-credentials-when-sending-an-msg-email.cs) | use smtpclient to authenticate to the smtp server with basic ntlm or oauth2 credentials when sending an msg email |
| [use-the-smtp-client-to-send-a-message-with-a-multipart-related-structure-containing-inline-images.cs](./use-the-smtp-client-to-send-a-message-with-a-multipart-related-structure-containing-inline-images.cs) | use the smtp client to send a message with a multipart related structure containing inline images |
| [validate-credentials-against-the-smtp-server-and-log-detailed-error-messages-for-authentication-failures.cs](./validate-credentials-against-the-smtp-server-and-log-detailed-error-messages-for-authentication-failures.cs) | validate credentials against the smtp server and log detailed error messages for authentication failures |
| [validate-recipient-email-addresses-against-rfc-5322-syntax-before-attempting-to-send-through-smtp.cs](./validate-recipient-email-addresses-against-rfc-5322-syntax-before-attempting-to-send-through-smtp.cs) | validate recipient email addresses against rfc 5322 syntax before attempting to send through smtp |
| [validate-smtp-credentials-asynchronously-to-improve-ui-responsiveness-in-a-desktop-email-client-application.cs](./validate-smtp-credentials-asynchronously-to-improve-ui-responsiveness-in-a-desktop-email-client-application.cs) | validate smtp credentials asynchronously to improve ui responsiveness in a desktop email client application |
| [validate-smtp-server-credentials-without-sending-an-email-by-calling-validatecredentials.cs](./validate-smtp-server-credentials-without-sending-an-email-by-calling-validatecredentials.cs) | validate smtp server credentials without sending an email by calling validatecredentials |

## Category Statistics
- Total examples: 167

## General Tips
- Follow root boundaries and testing guide.
- Dispose client objects; avoid hardcoded secrets; prefer explicit types.

<!-- AUTOGENERATED:START -->
| Date | Run ID | Branch/Commit |
|------|--------|---------------|
| 2026-09-14 | `auto` | examples/batch-auto |
<!-- AUTOGENERATED:END -->

Discussion

Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.

Posts are public.Sign in to post

No one has posted yet. Be the first.