Agentic batch 20260519_180010#214
Merged
agent-aspose-email-examples merged 146 commits intoMay 26, 2026
Merged
Conversation
…marketing-campaign-identifier.cs
…l-with-related-system-events.cs
…email-is-sent-from-development-staging-or-production.cs
…-before-transmitting-the-email.cs
…an-internal-user-identifier.cs
…ents-to-avoid-unnecessary-email-delivery-delays.cs
…dardize-case-and-remove-display-names.cs
…-transmit-it-using-tls-encryption.cs
…-long-waits-on-invalid-credentials.cs
…tate-downstream-tracking.cs
…nitial-connection-latency.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated submission from agentic runner.
Change summaries (LLM):
Demonstrates setting a distinct Reply-To address via MailMessage.ReplyToList.
Uses Aspose.Email.MailMessage, MailAddress, and SaveOptions.DefaultEml to build and save an EML file.
Creates output folder safely and wraps all I/O in try/catch blocks.
Shows placeholder SMTP host/credential detection to skip real sending in CI pipelines.
Includes SmtpClient(host, port, username, password) call for actual send when valid credentials are supplied.
Category: Working with SMTP client – custom reply handling; Safety: placeholder credentials guard.
Added example using Aspose.Email MailMessage and SmtpClient to send email with a custom X‑Audit‑Trail header.
Embeds JSON payload (operation, timestamp, user) via message.Headers.Add.
Includes guard that detects placeholder host/credentials and skips sending in CI.
Shows try/catch for SmtpException and generic errors around client.Send.
Category: SMTP client usage with custom email headers.
Added example for tagging emails with a custom marketing identifier
Uses Aspose.Email.MailMessage and ExchangeClient to send via Exchange Web Services
Injects “X-Campaign-Id” header into the message for campaign tracking
Includes guard clause that aborts when placeholder URI, username, or password are detected
Demonstrates safe placeholder handling for connection credentials and host URLs
Added custom “X-Correlation-Id” header to MailMessage for event correlation.
Uses Aspose.Email.MailMessage and Aspose.Email.Clients.Exchange.Dav.ExchangeClient to send via Exchange.
Implements placeholder detection (example.com) to skip real network calls in CI.
Wraps send operation in try/catch for robust error handling.
Demonstrates header injection pattern for tracing across systems.
Category: Email/Exchange client – safe placeholder handling.
Added example demonstrating custom X-Delivery-Token header on email messages.
Uses Aspose.Email.MailMessage to compose the message and SmtpClient for sending.
Generates a GUID via Guid.NewGuid() and adds it to message.Headers.
Includes placeholder SMTP host/port/credentials with runtime check to skip send.
Shows setting SecurityOptions.Auto for TLS negotiation.
Safety: replace placeholder values before running; error handling logs failures.
Add custom X‑Environment header to Aspose.Email.MailMessage
Utilize Aspose.Email.Clients.DeliveryService.SendGrid.SendGridClient for delivery
Guard against placeholder SendGrid API key before invoking send
Pass an empty List as categories to client.Send (category intent placeholder)
Wrap send operation and outer logic in try/catch for robust error handling
Safety: early exit on placeholder credentials; no secret values logged
Added example for adding a custom X-Feedback-Id header to an email.
Uses Aspose.Email.MailMessage to build the message and Aspose.Email.Clients.Exchange.Dav.ExchangeClient to send.
Implements placeholder credential detection to avoid real network calls in CI.
Demonstrates message.Headers.Add for custom header injection.
Shows error handling for send failures and unexpected exceptions.
Category: Exchange/SMTP client usage with safety placeholders.
Added example for sending email via ExchangeClient with custom X‑Mail‑Client header.
Uses Aspose.Email.MailMessage and Aspose.Email.Clients.Exchange.Dav.ExchangeClient.
Demonstrates setting message.Headers.Add("X‑Mail‑Client", "MyApp 1.0").
Includes placeholder credential check to avoid real network calls.
Wraps send in try/catch and logs success or error.
Safety: skips operation when mailboxUri contains “example.com”.