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

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

AGENTS.md2 starsChanged 7 months agoMITView on GitHub

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

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow root boundaries and testing guide.

    line 237

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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 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

FileDescription
add-a-custom-reply-to-address-that-differs-from-the-from-address-for-handling-responses.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadd 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.csadjust 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.csadjust 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.csapply 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.csapply 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.csapply 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.csapply 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.csapply 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.csattach 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.csauthenticate to the smtp server using cram md5 by setting authenticationtype property
bind-the-smtp-client-to-a-specific-local-ip-address-using-bindipendpoint.csbind 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.csbind 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure smtpclient to use cram md5 authentication only when the server advertises it
configure-smtpclient-with-a-60-second-operation-timeout-for-large-email-batches.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.csconfigure 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.cscreate 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.cscreate 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.cscreate 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.csenable 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.csenable 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.csenable 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.csenable 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.csenable 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.csenable smtp protocol logging and transmit an email message loaded from an msg file
enable-ssl-tls-encryption-on-smtpclient-by-setting-securityoptions-to-sslexplicit.csenable 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.csenable 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.csenable 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.csforward 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.csforward 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csimplement 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.csincrease 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.csinstantiate 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.csload 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.csload 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.csload credentials from an encrypted configuration file decrypt them then assign to smtpclient
load-smtp-authentication-credentials-from-a-json-configuration-file-using-loadcredentialsfromconfig.csload 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.csload 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.cslog 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.csquery 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.csretrieve 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.csretrieve and log supported authentication methods from the mail server using getsupportedauthenticationmethods
retrieve-server-extensions-and-conditionally-enable-starttls-if-the-starttls-extension-is-present.csretrieve 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.csretrieve 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.cssend 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.csserialize 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.csset 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.csset 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.csset 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.csset a custom x mailing id header on each message to facilitate downstream tracking
set-smtpclient-greetingtimeout-to-five-seconds-to-reduce-initial-connection-latency.csset 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.csset 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.csset 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.csset 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.csset 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.csset 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.csset 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.csspecify 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.csthrottle 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.cstransmit 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.csuse 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.csuse 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.csuse 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.csuse 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.csuse 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.csuse 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.csuse 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.csvalidate 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.csvalidate 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.csvalidate smtp credentials asynchronously to improve ui responsiveness in a desktop email client application
validate-smtp-server-credentials-without-sending-an-email-by-calling-validatecredentials.csvalidate 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 -->
DateRun IDBranch/Commit
2026-09-14autoexamples/batch-auto
<!-- AUTOGENERATED:END -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.