agentic-net-examples / programming-with-gmail
aspose-email/agentic-net-examples/programming-with-gmail/AGENTS.md
C# examples for programming-with-gmail using Aspose.Email for .NET
AGENTS.md2 starsChanged 5 months ago
--- name: programming-with-gmail description: C# examples for programming-with-gmail using Aspose.Email for .NET language: csharp framework: net8.0 parent: ../AGENTS.md --- # AGENTS - programming-with-gmail ## Persona You are a C# developer working in the **programming-with-gmail** category. This folder contains standalone C# examples for this category. See the root [AGENTS.md](../AGENTS.md) for repository-wide conventions. ## Scope - Examples for **programming-with-gmail**. - Files are standalone `.cs` examples stored directly in this folder. ## Required Namespaces - `using System;` (142 file(s)) - `using Aspose.Email;` (138 file(s)) - `using Aspose.Email.Clients.Google;` (100 file(s)) - `using Aspose.Email.Clients;` (52 file(s)) - `using System.IO;` (40 file(s)) - `using System.Collections.Generic;` (36 file(s)) - `using Aspose.Email.Calendar;` (20 file(s)) - `using Aspose.Email.Clients.Imap;` (16 file(s)) - `using Aspose.Email.Clients.Smtp;` (9 file(s)) - `using Aspose.Email.Storage.Mbox;` (9 file(s)) - `using Aspose.Email.PersonalInfo;` (9 file(s)) - `using Aspose.Email.Storage;` (7 file(s)) - `using Aspose.Email.Storage.Pst;` (7 file(s)) - `using System.Text;` (6 file(s)) - `using Aspose.Email.Mapi;` (5 file(s)) - `using System.Threading;` (4 file(s)) - `using Aspose.Email.Clients.Exchange.WebService;` (3 file(s)) - `using Aspose.Email.Clients.Imap.Models;` (3 file(s)) - `using System.Net;` (3 file(s)) - `using System.Net.Mime;` (3 file(s)) - `using Aspose.Email.Clients.Base;` (3 file(s)) - `using Aspose.Email.Clients.Pop3;` (3 file(s)) - `using System.Text.Json;` (2 file(s)) - `using System.Text.RegularExpressions;` (2 file(s)) - `using Aspose.Email.Tools.Search;` (2 file(s)) - `using System.Linq;` (2 file(s)) - `using System.Security.Cryptography.X509Certificates;` (2 file(s)) - `using Aspose.Email.Calendar.Recurrences;` (1 file(s)) - `using System.Xml;` (1 file(s)) - `using Aspose.Email.Amp;` (1 file(s)) - `using System.Net.Http;` (1 file(s)) - `using System.Diagnostics;` (1 file(s)) - `using System.Net.Security;` (1 file(s)) ## Files in this folder | File | Description | |------|-------------| | [access-and-obtain-the-metadata-fields-of-an-email-message-programmatically-for-further-processing.cs](./access-and-obtain-the-metadata-fields-of-an-email-message-programmatically-for-further-processing.cs) | access and obtain the metadata fields of an email message programmatically for further processing | | [add-a-custom-label-to-all-gmail-messages-received-from-a-specific-domain-using-igmailclient.cs](./add-a-custom-label-to-all-gmail-messages-received-from-a-specific-domain-using-igmailclient.cs) | add a custom label to all gmail messages received from a specific domain using igmailclient | | [add-a-new-appointment-entry-to-the-calendar-store-with-specified-details-and-recurrence-settings.cs](./add-a-new-appointment-entry-to-the-calendar-store-with-specified-details-and-recurrence-settings.cs) | add a new appointment entry to the calendar store with specified details and recurrence settings | | [add-a-new-calendar-appointment-to-the-schedule-using-the-library-s-appointment-insertion-api.cs](./add-a-new-calendar-appointment-to-the-schedule-using-the-library-s-appointment-insertion-api.cs) | add a new calendar appointment to the schedule using the library s appointment insertion api | | [add-a-new-label-to-gmail-messages-that-contain-attachments-and-move-them-to-a-designated-folder.cs](./add-a-new-label-to-gmail-messages-that-contain-attachments-and-move-them-to-a-designated-folder.cs) | add a new label to gmail messages that contain attachments and move them to a designated folder | | [append-a-newly-created-mailmessage-with-html-body-to-the-gmail-drafts-folder-via-imapclient.cs](./append-a-newly-created-mailmessage-with-html-body-to-the-gmail-drafts-folder-via-imapclient.cs) | append a newly created mailmessage with html body to the gmail drafts folder via imapclient | | [apply-a-filter-to-list-only-calendars-with-read-write-access-using-igmailclient-listcalendars-access-parameter.cs](./apply-a-filter-to-list-only-calendars-with-read-write-access-using-igmailclient-listcalendars-access-parameter.cs) | apply a filter to list only calendars with read write access using igmailclient listcalendars access parameter | | [authenticate-to-gmail-smtp-using-oauth2-and-send-a-plain-text-email-to-multiple-recipients.cs](./authenticate-to-gmail-smtp-using-oauth2-and-send-a-plain-text-email-to-multiple-recipients.cs) | authenticate to gmail smtp using oauth2 and send a plain text email to multiple recipients | | [authenticate-with-oauth2-refresh-token-and-send-a-calendar-invitation-email-via-gmail-smtp-with-icalendar-attachment.cs](./authenticate-with-oauth2-refresh-token-and-send-a-calendar-invitation-email-via-gmail-smtp-with-icalendar-attachment.cs) | authenticate with oauth2 refresh token and send a calendar invitation email via gmail smtp with icalendar attachment | | [batch-delete-gmail-messages-older-than-one-year-using-imap-and-verify-removal-through-folder-count.cs](./batch-delete-gmail-messages-older-than-one-year-using-imap-and-verify-removal-through-folder-count.cs) | batch delete gmail messages older than one year using imap and verify removal through folder count | | [batch-update-labels-of-multiple-gmail-messages-by-adding-a-reviewed-tag-using-igmailclient.cs](./batch-update-labels-of-multiple-gmail-messages-by-adding-a-reviewed-tag-using-igmailclient.cs) | batch update labels of multiple gmail messages by adding a reviewed tag using igmailclient | | [cache-calendar-ids-locally-to-reduce-api-calls-during-frequent-appointment-lookups.cs](./cache-calendar-ids-locally-to-reduce-api-calls-during-frequent-appointment-lookups.cs) | cache calendar ids locally to reduce api calls during frequent appointment lookups | | [capture-the-user-s-country-and-mobile-number-inputs-then-trigger-the-send-verification-code-action.cs](./capture-the-user-s-country-and-mobile-number-inputs-then-trigger-the-send-verification-code-action.cs) | capture the user s country and mobile number inputs then trigger the send verification code action | | [configure-gmail-smtp-client-to-use-oauth-2-0-access-token-instead-of-password-authentication.cs](./configure-gmail-smtp-client-to-use-oauth-2-0-access-token-instead-of-password-authentication.cs) | configure gmail smtp client to use oauth 2 0 access token instead of password authentication | | [configure-igmailclient-to-use-a-specific-http-proxy-by-setting-its-proxy-property.cs](./configure-igmailclient-to-use-a-specific-http-proxy-by-setting-its-proxy-property.cs) | configure igmailclient to use a specific http proxy by setting its proxy property | | [configure-oauth-2-0-credentials-to-authenticate-a-gmail-client-for-sending-messages-via-smtp.cs](./configure-oauth-2-0-credentials-to-authenticate-a-gmail-client-for-sending-messages-via-smtp.cs) | configure oauth 2 0 credentials to authenticate a gmail client for sending messages via smtp | | [connect-to-gmail-imap-with-ssl-select-the-sent-folder-and-retrieve-the-latest-ten-messages.cs](./connect-to-gmail-imap-with-ssl-select-the-sent-folder-and-retrieve-the-latest-ten-messages.cs) | connect to gmail imap with ssl select the sent folder and retrieve the latest ten messages | | [convert-an-mbox-archive-to-pst-format-providing-the-option-to-strip-or-retain-email-signatures-as-required.cs](./convert-an-mbox-archive-to-pst-format-providing-the-option-to-strip-or-retain-email-signatures-as-required.cs) | convert an mbox archive to pst format providing the option to strip or retain email signatures as required | | [convert-an-mbox-archive-to-pst-format-while-stripping-any-email-signatures-from-the-messages.cs](./convert-an-mbox-archive-to-pst-format-while-stripping-any-email-signatures-from-the-messages.cs) | convert an mbox archive to pst format while stripping any email signatures from the messages | | [convert-an-mbox-mailbox-file-to-pst-format-optionally-retaining-or-stripping-message-signatures.cs](./convert-an-mbox-mailbox-file-to-pst-format-optionally-retaining-or-stripping-message-signatures.cs) | convert an mbox mailbox file to pst format optionally retaining or stripping message signatures | | [convert-gmail-message-plain-text-bodies-to-utf-8-encoding-and-save-the-converted-files.cs](./convert-gmail-message-plain-text-bodies-to-utf-8-encoding-and-save-the-converted-files.cs) | convert gmail message plain text bodies to utf 8 encoding and save the converted files | | [copy-a-batch-of-messages-from-the-inbox-to-the-archive-folder-using-imapclient-while-preserving-flags.cs](./copy-a-batch-of-messages-from-the-inbox-to-the-archive-folder-using-imapclient-while-preserving-flags.cs) | copy a batch of messages from the inbox to the archive folder using imapclient while preserving flags | | [create-a-custom-mime-email-with-multipart-alternative-sections-for-html-and-plain-text-then-send-via-gmail.cs](./create-a-custom-mime-email-with-multipart-alternative-sections-for-html-and-plain-text-then-send-via-gmail.cs) | create a custom mime email with multipart alternative sections for html and plain text then send via gmail | | [create-a-draft-gmail-message-add-custom-headers-and-save-it-using-the-api.cs](./create-a-draft-gmail-message-add-custom-headers-and-save-it-using-the-api.cs) | create a draft gmail message add custom headers and save it using the api | | [create-a-google-contact-with-name-email-and-organization-fields-using-the-api.cs](./create-a-google-contact-with-name-email-and-organization-fields-using-the-api.cs) | create a google contact with name email and organization fields using the api | | [create-a-nested-folder-structure-projects-2024-alpha-in-gmail-using-imapclient-and-verify-existence.cs](./create-a-nested-folder-structure-projects-2024-alpha-in-gmail-using-imapclient-and-verify-existence.cs) | create a nested folder structure projects 2024 alpha in gmail using imapclient and verify existence | | [create-a-new-calendar-with-specified-summary-and-time-zone-via-igmailclient-createcalendar.cs](./create-a-new-calendar-with-specified-summary-and-time-zone-via-igmailclient-createcalendar.cs) | create a new calendar with specified summary and time zone via igmailclient createcalendar | | [create-a-new-gmail-label-named-projectx-using-imap-and-move-matching-inbox-messages.cs](./create-a-new-gmail-label-named-projectx-using-imap-and-move-matching-inbox-messages.cs) | create a new gmail label named projectx using imap and move matching inbox messages | | [create-a-new-google-contact-with-name-email-and-organization-fields-using-the-api.cs](./create-a-new-google-contact-with-name-email-and-organization-fields-using-the-api.cs) | create a new google contact with name email and organization fields using the api | | [create-and-insert-calendar-events-into-a-google-calendar-account-using-the-appropriate-api-calls.cs](./create-and-insert-calendar-events-into-a-google-calendar-account-using-the-appropriate-api-calls.cs) | create and insert calendar events into a google calendar account using the appropriate api calls | | [create-and-manipulate-outlook-items-convert-ics-files-to-msg-handle-outlook-storage-files-and-process-smtp-communication.cs](./create-and-manipulate-outlook-items-convert-ics-files-to-msg-handle-outlook-storage-files-and-process-smtp-communication.cs) | create and manipulate outlook items convert ics files to msg handle outlook storage files and process smtp communication | | [create-and-manipulate-outlook-items-converting-ics-calendar-files-to-msg-email-format-programmatically.cs](./create-and-manipulate-outlook-items-converting-ics-calendar-files-to-msg-email-format-programmatically.cs) | create and manipulate outlook items converting ics calendar files to msg email format programmatically | | [create-googleuser-instance-using-client-credentials-and-stored-refresh-token-for-silent-authentication.cs](./create-googleuser-instance-using-client-credentials-and-stored-refresh-token-for-silent-authentication.cs) | create googleuser instance using client credentials and stored refresh token for silent authentication | | [create-retrieve-and-modify-gmail-calendar-events-programmatically-using-the-provided-api-endpoints-directly.cs](./create-retrieve-and-modify-gmail-calendar-events-programmatically-using-the-provided-api-endpoints-directly.cs) | create retrieve and modify gmail calendar events programmatically using the provided api endpoints directly | | [create-update-retrieve-and-delete-google-calendar-appointments-programmatically-using-the-provided-api-endpoints.cs](./create-update-retrieve-and-delete-google-calendar-appointments-programmatically-using-the-provided-api-endpoints.cs) | create update retrieve and delete google calendar appointments programmatically using the provided api endpoints | | [delete-a-calendar-permanently-by-providing-its-identifier-to-igmailclient-deletecalendar.cs](./delete-a-calendar-permanently-by-providing-its-identifier-to-igmailclient-deletecalendar.cs) | delete a calendar permanently by providing its identifier to igmailclient deletecalendar | | [delete-a-specific-gmail-message-by-id-using-igmailclient-from-the-mailbox.cs](./delete-a-specific-gmail-message-by-id-using-igmailclient-from-the-mailbox.cs) | delete a specific gmail message by id using igmailclient from the mailbox | | [deserialize-encrypted-json-back-into-a-googleuser-object-to-re-establish-authenticated-session.cs](./deserialize-encrypted-json-back-into-a-googleuser-object-to-re-establish-authenticated-session.cs) | deserialize encrypted json back into a googleuser object to re establish authenticated session | | [detect-and-resolve-conflicting-appointments-by-checking-overlapping-time-ranges-before-creation.cs](./detect-and-resolve-conflicting-appointments-by-checking-overlapping-time-ranges-before-creation.cs) | detect and resolve conflicting appointments by checking overlapping time ranges before creation | | [develop-programmatic-integrations-with-thunderbird-using-its-apis-for-email-composition-retrieval-and-management.cs](./develop-programmatic-integrations-with-thunderbird-using-its-apis-for-email-composition-retrieval-and-management.cs) | develop programmatic integrations with thunderbird using its apis for email composition retrieval and management | | [download-all-unread-gmail-messages-mark-them-as-read-and-store-attachments-in-a-local-directory.cs](./download-all-unread-gmail-messages-mark-them-as-read-and-store-attachments-in-a-local-directory.cs) | download all unread gmail messages mark them as read and store attachments in a local directory | | [exchange-authorization-code-for-access-and-refresh-tokens-via-googleoauthhelper-token-request.cs](./exchange-authorization-code-for-access-and-refresh-tokens-via-googleoauthhelper-token-request.cs) | exchange authorization code for access and refresh tokens via googleoauthhelper token request | | [exchange-the-provided-authorization-code-for-a-refresh-token-using-the-oauth2-authentication-endpoint.cs](./exchange-the-provided-authorization-code-for-a-refresh-token-using-the-oauth2-authentication-endpoint.cs) | exchange the provided authorization code for a refresh token using the oauth2 authentication endpoint | | [export-a-list-of-google-contacts-to-a-csv-file-including-name-email-and-phone-columns.cs](./export-a-list-of-google-contacts-to-a-csv-file-including-name-email-and-phone-columns.cs) | export a list of google contacts to a csv file including name email and phone columns | | [export-gmail-folder-hierarchy-to-an-xml-document-preserving-parent-child-relationships-for-each-label.cs](./export-gmail-folder-hierarchy-to-an-xml-document-preserving-parent-child-relationships-for-each-label.cs) | export gmail folder hierarchy to an xml document preserving parent child relationships for each label | | [export-google-contacts-to-csv-including-name-email-and-phone-columns.cs](./export-google-contacts-to-csv-including-name-email-and-phone-columns.cs) | export google contacts to csv including name email and phone columns | | [extract-all-urls-from-gmail-message-html-bodies-and-store-them-in-a-csv-file.cs](./extract-all-urls-from-gmail-message-html-bodies-and-store-them-in-a-csv-file.cs) | extract all urls from gmail message html bodies and store them in a csv file | | [extract-calendar-event-attachments-from-gmail-messages-and-convert-them-from-ical-to-outlook-msg-format.cs](./extract-calendar-event-attachments-from-gmail-messages-and-convert-them-from-ical-to-outlook-msg-format.cs) | extract calendar event attachments from gmail messages and convert them from ical to outlook msg format | | [fetch-a-specific-gmail-message-by-id-using-igmailclient-and-display-its-plain-text-body.cs](./fetch-a-specific-gmail-message-by-id-using-igmailclient-and-display-its-plain-text-body.cs) | fetch a specific gmail message by id using igmailclient and display its plain text body | | [fetch-existing-google-calendar-events-and-modify-their-properties-programmatically-using-the-appropriate-api-calls.cs](./fetch-existing-google-calendar-events-and-modify-their-properties-programmatically-using-the-appropriate-api-calls.cs) | fetch existing google calendar events and modify their properties programmatically using the appropriate api calls | | [fetch-gmail-messages-from-the-last-seven-days-using-imap-and-filter-them-by-sender-domain.cs](./fetch-gmail-messages-from-the-last-seven-days-using-imap-and-filter-them-by-sender-domain.cs) | fetch gmail messages from the last seven days using imap and filter them by sender domain | | [fetch-gmail-messages-with-amp-html-content-and-render-them-to-plain-text-for-analysis.cs](./fetch-gmail-messages-with-amp-html-content-and-render-them-to-plain-text-for-analysis.cs) | fetch gmail messages with amp html content and render them to plain text for analysis | | [fetch-gmail-messages-with-specific-labels-extract-their-plain-text-bodies-and-store-them-in-elasticsearch.cs](./fetch-gmail-messages-with-specific-labels-extract-their-plain-text-bodies-and-store-them-in-elasticsearch.cs) | fetch gmail messages with specific labels extract their plain text bodies and store them in elasticsearch | | [fetch-raw-mime-source-of-a-gmail-message-and-save-it-as-an-eml-file-for-archiving.cs](./fetch-raw-mime-source-of-a-gmail-message-and-save-it-as-an-eml-file-for-archiving.cs) | fetch raw mime source of a gmail message and save it as an eml file for archiving | | [generate-a-report-summarizing-gmail-inbox-statistics-including-total-messages-unread-count-and-size-per-label.cs](./generate-a-report-summarizing-gmail-inbox-statistics-including-total-messages-unread-count-and-size-per-label.cs) | generate a report summarizing gmail inbox statistics including total messages unread count and size per label | | [generate-and-write-email-messages-to-an-mbox-file-adhering-to-the-standard-mailbox-format.cs](./generate-and-write-email-messages-to-an-mbox-file-adhering-to-the-standard-mailbox-format.cs) | generate and write email messages to an mbox file adhering to the standard mailbox format | | [generate-oauth-2-0-authorization-url-using-googleoauthhelper-with-client-id-and-scopes.cs](./generate-oauth-2-0-authorization-url-using-googleoauthhelper-with-client-id-and-scopes.cs) | generate oauth 2 0 authorization url using googleoauthhelper with client id and scopes | | [implement-a-c-solution-to-convert-thunderbird-email-files-into-compatible-formats-while-preserving-message-integrity.cs](./implement-a-c-solution-to-convert-thunderbird-email-files-into-compatible-formats-while-preserving-message-integrity.cs) | implement a c solution to convert thunderbird email files into compatible formats while preserving message integrity | | [implement-a-googleuser-class-that-handles-oauth-2-0-authentication-flows-and-token-management-including-token-acquisition-refre.cs](./implement-a-googleuser-class-that-handles-oauth-2-0-authentication-flows-and-token-management-including-token-acquisition-refre.cs) | implement a googleuser class that handles oauth 2 0 authentication flows and token management including token acquisition refre | | [implement-a-health-check-that-verifies-igmailclient-can-list-calendars-using-the-current-access-token.cs](./implement-a-health-check-that-verifies-igmailclient-can-list-calendars-using-the-current-access-token.cs) | implement a health check that verifies igmailclient can list calendars using the current access token | | [implement-a-retry-mechanism-that-re-authenticates-oauth-token-upon-expiration-during-gmail-operations.cs](./implement-a-retry-mechanism-that-re-authenticates-oauth-token-upon-expiration-during-gmail-operations.cs) | implement a retry mechanism that re authenticates oauth token upon expiration during gmail operations | | [implement-a-scheduled-job-that-checks-gmail-inbox-every-fifteen-minutes-and-processes-new-emails.cs](./implement-a-scheduled-job-that-checks-gmail-inbox-every-fifteen-minutes-and-processes-new-emails.cs) | implement a scheduled job that checks gmail inbox every fifteen minutes and processes new emails | | [implement-a-webhook-listener-to-receive-gmail-push-notifications-for-new-incoming-messages.cs](./implement-a-webhook-listener-to-receive-gmail-push-notifications-for-new-incoming-messages.cs) | implement a webhook listener to receive gmail push notifications for new incoming messages | | [implement-email-file-conversion-in-a-thunderbird-based-application-using-the-c-api-covering-zimbra-integration-overview.cs](./implement-email-file-conversion-in-a-thunderbird-based-application-using-the-c-api-covering-zimbra-integration-overview.cs) | implement email file conversion in a thunderbird based application using the c api covering zimbra integration overview | | [implement-exponential-backoff-retry-logic-for-transient-network-errors-when-calling-igmailclient-methods.cs](./implement-exponential-backoff-retry-logic-for-transient-network-errors-when-calling-igmailclient-methods.cs) | implement exponential backoff retry logic for transient network errors when calling igmailclient methods | | [implement-exponential-backoff-retry-strategy-for-gmail-api-calls-that-encounter-transient-network-errors.cs](./implement-exponential-backoff-retry-strategy-for-gmail-api-calls-that-encounter-transient-network-errors.cs) | implement exponential backoff retry strategy for gmail api calls that encounter transient network errors | | [implement-functionality-to-programmatically-create-modify-and-remove-gmail-calendar-entries-via-the-api.cs](./implement-functionality-to-programmatically-create-modify-and-remove-gmail-calendar-entries-via-the-api.cs) | implement functionality to programmatically create modify and remove gmail calendar entries via the api | | [implement-functionality-to-relocate-and-remove-calendar-events-within-a-google-calendar-using-the-api.cs](./implement-functionality-to-relocate-and-remove-calendar-events-within-a-google-calendar-using-the-api.cs) | implement functionality to relocate and remove calendar events within a google calendar using the api | | [implement-functionality-to-split-an-mbox-storage-file-into-separate-messages-and-provide-the-ability-to-abort-the-splitting.cs](./implement-functionality-to-split-an-mbox-storage-file-into-separate-messages-and-provide-the-ability-to-abort-the-splitting.cs) | implement functionality to split an mbox storage file into separate messages and provide the ability to abort the splitting | | [implement-handling-of-calendar-client-configuration-and-associated-color-metadata-properly-within-the-application.cs](./implement-handling-of-calendar-client-configuration-and-associated-color-metadata-properly-within-the-application.cs) | implement handling of calendar client configuration and associated color metadata properly within the application | | [implement-oauth-2-0-authentication-flow-utilizing-the-googleoauthhelper-class-to-obtain-valid-access-tokens.cs](./implement-oauth-2-0-authentication-flow-utilizing-the-googleoauthhelper-class-to-obtain-valid-access-tokens.cs) | implement oauth 2 0 authentication flow utilizing the googleoauthhelper class to obtain valid access tokens | | [implement-pagination-when-listing-calendars-using-igmailclient-listcalendars-with-page-token.cs](./implement-pagination-when-listing-calendars-using-igmailclient-listcalendars-with-page-token.cs) | implement pagination when listing calendars using igmailclient listcalendars with page token | | [implement-permission-based-access-control-for-calendar-resources-enabling-read-write-and-share-restrictions-per-user.cs](./implement-permission-based-access-control-for-calendar-resources-enabling-read-write-and-share-restrictions-per-user.cs) | implement permission based access control for calendar resources enabling read write and share restrictions per user | | [implement-secure-google-oauth-2-0-authentication-flow-ensuring-token-handling-and-data-transmission-meet-industry-standards.cs](./implement-secure-google-oauth-2-0-authentication-flow-ensuring-token-handling-and-data-transmission-meet-industry-standards.cs) | implement secure google oauth 2 0 authentication flow ensuring token handling and data transmission meet industry standards | | [initialize-a-new-cloud-console-project-by-configuring-the-required-settings-and-enabling-necessary-apis.cs](./initialize-a-new-cloud-console-project-by-configuring-the-required-settings-and-enabling-necessary-apis.cs) | initialize a new cloud console project by configuring the required settings and enabling necessary apis | | [initialize-igmailclient-with-authenticated-googleuser-to-access-gmail-calendar-apis.cs](./initialize-igmailclient-with-authenticated-googleuser-to-access-gmail-calendar-apis.cs) | initialize igmailclient with authenticated googleuser to access gmail calendar apis | | [list-access-control-rules-for-a-specific-calendar-using-igmailclient-listaccessrules.cs](./list-access-control-rules-for-a-specific-calendar-using-igmailclient-listaccessrules.cs) | list access control rules for a specific calendar using igmailclient listaccessrules | | [list-all-calendars-for-the-authenticated-user-using-igmailclient-listcalendars-method.cs](./list-all-calendars-for-the-authenticated-user-using-igmailclient-listcalendars-method.cs) | list all calendars for the authenticated user using igmailclient listcalendars method | | [list-all-gmail-folders-using-imapclient-and-output-their-names.cs](./list-all-gmail-folders-using-imapclient-and-output-their-names.cs) | list all gmail folders using imapclient and output their names | | [list-gmailmessageinfo-objects-for-the-last-24-hours-and-log-each-sender-address.cs](./list-gmailmessageinfo-objects-for-the-last-24-hours-and-log-each-sender-address.cs) | list gmailmessageinfo objects for the last 24 hours and log each sender address | | [log-all-igmailclient-operations-with-timestamps-and-results-for-audit-purposes.cs](./log-all-igmailclient-operations-with-timestamps-and-results-for-audit-purposes.cs) | log all igmailclient operations with timestamps and results for audit purposes | | [log-detailed-smtp-transaction-steps-including-server-responses-for-troubleshooting-email-delivery-issues.cs](./log-detailed-smtp-transaction-steps-including-server-responses-for-troubleshooting-email-delivery-issues.cs) | log detailed smtp transaction steps including server responses for troubleshooting email delivery issues | | [mark-a-gmail-message-as-read-using-imapclient-after-downloading-its-content.cs](./mark-a-gmail-message-as-read-using-imapclient-after-downloading-its-content.cs) | mark a gmail message as read using imapclient after downloading its content | | [mark-retrieved-gmail-messages-as-read-after-successful-processing-to-prevent-duplicate-handling.cs](./mark-retrieved-gmail-messages-as-read-after-successful-processing-to-prevent-duplicate-handling.cs) | mark retrieved gmail messages as read after successful processing to prevent duplicate handling | | [modify-an-accesscontrolrule-to-grant-read-permission-and-save-via-igmailclient-updateaccessrule.cs](./modify-an-accesscontrolrule-to-grant-read-permission-and-save-via-igmailclient-updateaccessrule.cs) | modify an accesscontrolrule to grant read permission and save via igmailclient updateaccessrule | | [move-an-appointment-to-another-calendar-by-providing-source-and-destination-ids-to-igmailclient-moveappointment.cs](./move-an-appointment-to-another-calendar-by-providing-source-and-destination-ids-to-igmailclient-moveappointment.cs) | move an appointment to another calendar by providing source and destination ids to igmailclient moveappointment | | [navigate-to-https-cloud-google-com-console-project-and-authenticate-with-your-gmail-account-credentials-to-access-the-console.cs](./navigate-to-https-cloud-google-com-console-project-and-authenticate-with-your-gmail-account-credentials-to-access-the-console.cs) | navigate to https cloud google com console project and authenticate with your gmail account credentials to access the console | | [navigate-to-the-given-url-complete-all-required-actions-and-retrieve-the-resulting-authorization-code.cs](./navigate-to-the-given-url-complete-all-required-actions-and-retrieve-the-resulting-authorization-code.cs) | navigate to the given url complete all required actions and retrieve the resulting authorization code | | [obtain-the-color-attributes-embedded-within-an-email-s-content-for-processing-or-analysis-programmatically.cs](./obtain-the-color-attributes-embedded-within-an-email-s-content-for-processing-or-analysis-programmatically.cs) | obtain the color attributes embedded within an email s content for processing or analysis programmatically | | [parse-mbox-files-to-retrieve-email-messages-and-their-metadata-programmatically-for-further-processing.cs](./parse-mbox-files-to-retrieve-email-messages-and-their-metadata-programmatically-for-further-processing.cs) | parse mbox files to retrieve email messages and their metadata programmatically for further processing | | [perform-a-freebusy-query-against-google-calendar-to-retrieve-availability-information-for-specified-users-and-time-range.cs](./perform-a-freebusy-query-against-google-calendar-to-retrieve-availability-information-for-specified-users-and-time-range.cs) | perform a freebusy query against google calendar to retrieve availability information for specified users and time range | | [perform-google-calendar-operations-through-the-gmail-client-api-enabling-creation-retrieval-and-modification-of-events.cs](./perform-google-calendar-operations-through-the-gmail-client-api-enabling-creation-retrieval-and-modification-of-events.cs) | perform google calendar operations through the gmail client api enabling creation retrieval and modification of events | | [perform-oauth2-authentication-using-tokenresponse-and-configure-client.cs](./perform-oauth2-authentication-using-tokenresponse-and-configure-client.cs) | perform oauth2 authentication using tokenresponse and configure client | | [programmatically-convert-thunderbird-email-files-to-standard-formats-using-the-provided-api-for-application-integration.cs](./programmatically-convert-thunderbird-email-files-to-standard-formats-using-the-provided-api-for-application-integration.cs) | programmatically convert thunderbird email files to standard formats using the provided api for application integration | | [programmatically-retrieve-the-total-count-of-email-messages-stored-in-an-mbox-file-using-the-api.cs](./programmatically-retrieve-the-total-count-of-email-messages-stored-in-an-mbox-file-using-the-api.cs) | programmatically retrieve the total count of email messages stored in an mbox file using the api | | [prompt-the-user-to-input-the-otp-received-via-mobile-sms-for-authentication-verification.cs](./prompt-the-user-to-input-the-otp-received-via-mobile-sms-for-authentication-verification.cs) | prompt the user to input the otp received via mobile sms for authentication verification | | [provision-a-new-google-developer-console-project-to-enable-authorized-api-access-for-the-application.cs](./provision-a-new-google-developer-console-project-to-enable-authorized-api-access-for-the-application.cs) | provision a new google developer console project to enable authorized api access for the application | | [refresh-an-expired-access-token-by-invoking-googleoauthhelper-refreshaccesstoken-with-stored-refresh-token.cs](./refresh-an-expired-access-token-by-invoking-googleoauthhelper-refreshaccesstoken-with-stored-refresh-token.cs) | refresh an expired access token by invoking googleoauthhelper refreshaccesstoken with stored refresh token | | [register-to-receive-product-update-notifications-via-the-provided-subscription-service-to-stay-informed-about-new-releases.cs](./register-to-receive-product-update-notifications-via-the-provided-subscription-service-to-stay-informed-about-new-releases.cs) | register to receive product update notifications via the provided subscription service to stay informed about new releases | | [remove-designated-google-calendar-instances-programmatically-ensuring-only-the-targeted-calendars-are-permanently-deleted.cs](./remove-designated-google-calendar-instances-programmatically-ensuring-only-the-targeted-calendars-are-permanently-deleted.cs) | remove designated google calendar instances programmatically ensuring only the targeted calendars are permanently deleted | | [rename-an-existing-gmail-folder-from-temp-to-processed-using-imapclient-and-confirm-the-change.cs](./rename-an-existing-gmail-folder-from-temp-to-processed-using-imapclient-and-confirm-the-change.cs) | rename an existing gmail folder from temp to processed using imapclient and confirm the change | | [retrieve-a-gmail-message-parse-its-mime-parts-and-display-each-part-content-type.cs](./retrieve-a-gmail-message-parse-its-mime-parts-and-display-each-part-content-type.cs) | retrieve a gmail message parse its mime parts and display each part content type | | [retrieve-and-modify-the-client-configuration-settings-programmatically-within-the-net-library-for-authentication-and-behavior.cs](./retrieve-and-modify-the-client-configuration-settings-programmatically-within-the-net-library-for-authentication-and-behavior.cs) | retrieve and modify the client configuration settings programmatically within the net library for authentication and behavior | | [retrieve-appointments-within-a-date-range-from-a-calendar-using-igmailclient-getappointments.cs](./retrieve-appointments-within-a-date-range-from-a-calendar-using-igmailclient-getappointments.cs) | retrieve appointments within a date range from a calendar using igmailclient getappointments | | [retrieve-calendar-metadata-such-as-id-summary-and-time-zone-using-igmailclient-getcalendarinfo.cs](./retrieve-calendar-metadata-such-as-id-summary-and-time-zone-using-igmailclient-getcalendarinfo.cs) | retrieve calendar metadata such as id summary and time zone using igmailclient getcalendarinfo | | [retrieve-gmail-client-color-palette-by-calling-igmailclient-getcolors-method-directly.cs](./retrieve-gmail-client-color-palette-by-calling-igmailclient-getcolors-method-directly.cs) | retrieve gmail client color palette by calling igmailclient getcolors method directly | | [retrieve-gmail-client-settings-including-language-and-time-format-via-igmailclient-getclientsettings.cs](./retrieve-gmail-client-settings-including-language-and-time-format-via-igmailclient-getclientsettings.cs) | retrieve gmail client settings including language and time format via igmailclient getclientsettings | | [retrieve-gmail-messages-containing-xlsx-attachments-and-list-their-sender-email-addresses.cs](./retrieve-gmail-messages-containing-xlsx-attachments-and-list-their-sender-email-addresses.cs) | retrieve gmail messages containing xlsx attachments and list their sender email addresses | | [retrieve-gmail-messages-via-imap-decrypt-s-mime-encrypted-parts-and-save-plaintext-content.cs](./retrieve-gmail-messages-via-imap-decrypt-s-mime-encrypted-parts-and-save-plaintext-content.cs) | retrieve gmail messages via imap decrypt s mime encrypted parts and save plaintext content | | [retrieve-gmail-messages-via-pop3-parse-their-mime-parts-and-log-subject-lines-to-a-text-file.cs](./retrieve-gmail-messages-via-pop3-parse-their-mime-parts-and-log-subject-lines-to-a-text-file.cs) | retrieve gmail messages via pop3 parse their mime parts and log subject lines to a text file | | [retrieve-gmail-messages-with-a-specific-label-extract-html-bodies-and-save-them-as-html-files.cs](./retrieve-gmail-messages-with-a-specific-label-extract-html-bodies-and-save-them-as-html-files.cs) | retrieve gmail messages with a specific label extract html bodies and save them as html files | | [retrieve-gmail-pop3-messages-save-each-as-an-eml-file-and-delete-them-from-the-server.cs](./retrieve-gmail-pop3-messages-save-each-as-an-eml-file-and-delete-them-from-the-server.cs) | retrieve gmail pop3 messages save each as an eml file and delete them from the server | | [retrieve-google-contacts-in-pages-of-fifty-entries-and-log-each-page-processing-time.cs](./retrieve-google-contacts-in-pages-of-fifty-entries-and-log-each-page-processing-time.cs) | retrieve google contacts in pages of fifty entries and log each page processing time | | [retrieve-mailbox-statistics-from-gmail-imap-including-total-message-count-and-size-output-as-json.cs](./retrieve-mailbox-statistics-from-gmail-imap-including-total-message-count-and-size-output-as-json.cs) | retrieve mailbox statistics from gmail imap including total message count and size output as json | | [retrieve-specific-email-messages-from-an-mbox-archive-by-their-unique-identifiers-for-processing.cs](./retrieve-specific-email-messages-from-an-mbox-archive-by-their-unique-identifiers-for-processing.cs) | retrieve specific email messages from an mbox archive by their unique identifiers for processing | | [retrieve-the-current-email-message-s-size-in-bytes-enabling-size-based-processing-and-conditional-handling.cs](./retrieve-the-current-email-message-s-size-in-bytes-enabling-size-based-processing-and-conditional-handling.cs) | retrieve the current email message s size in bytes enabling size based processing and conditional handling | | [search-for-gmail-messages-with-attachments-larger-than-5-mb-using-igmailclient-and-list-their-ids.cs](./search-for-gmail-messages-with-attachments-larger-than-5-mb-using-igmailclient-and-list-their-ids.cs) | search for gmail messages with attachments larger than 5 mb using igmailclient and list their ids | | [search-gmail-inbox-using-imap-with-complex-criteria-combining-date-range-and-keyword-in-body.cs](./search-gmail-inbox-using-imap-with-complex-criteria-combining-date-range-and-keyword-in-body.cs) | search gmail inbox using imap with complex criteria combining date range and keyword in body | | [securely-store-tokenresponse-data-to-enable-future-token-refresh-without-reauthorization.cs](./securely-store-tokenresponse-data-to-enable-future-token-refresh-without-reauthorization.cs) | securely store tokenresponse data to enable future token refresh without reauthorization | | [select-i-have-read-and-agree-to-all-terms-of-service-for-the-google-cloud-platform-products-checkbox-click-create.cs](./select-i-have-read-and-agree-to-all-terms-of-service-for-the-google-cloud-platform-products-checkbox-click-create.cs) | select i have read and agree to all terms of service for the google cloud platform products checkbox click create | | [send-a-gmail-email-with-a-custom-message-id-header-to-ensure-unique-tracking-across-systems.cs](./send-a-gmail-email-with-a-custom-message-id-header-to-ensure-unique-tracking-across-systems.cs) | send a gmail email with a custom message id header to ensure unique tracking across systems | | [send-a-gmail-email-with-embedded-inline-images-using-cid-references-in-the-html-body.cs](./send-a-gmail-email-with-embedded-inline-images-using-cid-references-in-the-html-body.cs) | send a gmail email with embedded inline images using cid references in the html body | | [send-a-gmail-message-with-high-priority-flag-by-specifying-the-x-priority-header.cs](./send-a-gmail-message-with-high-priority-flag-by-specifying-the-x-priority-header.cs) | send a gmail message with high priority flag by specifying the x priority header | | [send-a-personalized-bulk-email-to-multiple-recipients-by-iterating-over-a-csv-list-of-addresses.cs](./send-a-personalized-bulk-email-to-multiple-recipients-by-iterating-over-a-csv-list-of-addresses.cs) | send a personalized bulk email to multiple recipients by iterating over a csv list of addresses | | [send-an-email-with-a-pdf-and-an-image-attachment-through-gmail-smtp-using-starttls.cs](./send-an-email-with-a-pdf-and-an-image-attachment-through-gmail-smtp-using-starttls.cs) | send an email with a pdf and an image attachment through gmail smtp using starttls | | [send-an-email-with-embedded-inline-images-using-cid-references-through-gmail-smtp-service.cs](./send-an-email-with-embedded-inline-images-using-cid-references-through-gmail-smtp-service.cs) | send an email with embedded inline images using cid references through gmail smtp service | | [send-an-email-with-multiple-attachments-including-pdf-and-image-files-through-gmail-smtp-server.cs](./send-an-email-with-multiple-attachments-including-pdf-and-image-files-through-gmail-smtp-server.cs) | send an email with multiple attachments including pdf and image files through gmail smtp server | | [set-default-reminder-settings-for-a-calendar-via-igmailclient-updatecalendar-defaultreminders-collection.cs](./set-default-reminder-settings-for-a-calendar-via-igmailclient-updatecalendar-defaultreminders-collection.cs) | set default reminder settings for a calendar via igmailclient updatecalendar defaultreminders collection | | [set-up-oauth-2-0-authentication-to-authorize-api-calls-to-google-services-within-your-net-application.cs](./set-up-oauth-2-0-authentication-to-authorize-api-calls-to-google-services-within-your-net-application.cs) | set up oauth 2 0 authentication to authorize api calls to google services within your net application | | [specify-load-options-to-control-how-messages-are-read-from-an-mbox-file-during-the-import-process.cs](./specify-load-options-to-control-how-messages-are-read-from-an-mbox-file-during-the-import-process.cs) | specify load options to control how messages are read from an mbox file during the import process | | [specify-the-desired-text-encoding-to-use-when-loading-mbox-files-for-reading-operations.cs](./specify-the-desired-text-encoding-to-use-when-loading-mbox-files-for-reading-operations.cs) | specify the desired text encoding to use when loading mbox files for reading operations | | [synchronize-deleted-gmail-messages-with-a-local-archive-by-moving-them-to-a-deleted-folder-before-removal.cs](./synchronize-deleted-gmail-messages-with-a-local-archive-by-moving-them-to-a-deleted-folder-before-removal.cs) | synchronize deleted gmail messages with a local archive by moving them to a deleted folder before removal | | [synchronize-google-contacts-with-an-internal-crm-system-by-comparing-email-fields-and-updating-differences.cs](./synchronize-google-contacts-with-an-internal-crm-system-by-comparing-email-fields-and-updating-differences.cs) | synchronize google contacts with an internal crm system by comparing email fields and updating differences | | [transform-an-icalendar-ics-file-into-an-outlook-msg-message-handling-associated-outlook-items-and-storage-files.cs](./transform-an-icalendar-ics-file-into-an-outlook-msg-message-handling-associated-outlook-items-and-storage-files.cs) | transform an icalendar ics file into an outlook msg message handling associated outlook items and storage files | | [update-an-existing-calendar-description-or-color-using-igmailclient-updatecalendar-method.cs](./update-an-existing-calendar-description-or-color-using-igmailclient-updatecalendar-method.cs) | update an existing calendar description or color using igmailclient updatecalendar method | | [update-gmail-client-settings-such-as-default-time-format-using-igmailclient-updateclientsettings.cs](./update-gmail-client-settings-such-as-default-time-format-using-igmailclient-updateclientsettings.cs) | update gmail client settings such as default time format using igmailclient updateclientsettings | | [update-google-contact-phone-number-identified-by-its-unique-resource-identifier.cs](./update-google-contact-phone-number-identified-by-its-unique-resource-identifier.cs) | update google contact phone number identified by its unique resource identifier | | [update-the-phone-number-of-a-google-contact-identified-by-its-unique-resource-identifier.cs](./update-the-phone-number-of-a-google-contact-identified-by-its-unique-resource-identifier.cs) | update the phone number of a google contact identified by its unique resource identifier | | [use-igmailclient-to-list-unread-message-summaries-and-export-them-to-a-csv-file.cs](./use-igmailclient-to-list-unread-message-summaries-and-export-them-to-a-csv-file.cs) | use igmailclient to list unread message summaries and export them to a csv file | | [use-microsoft-graph-client-to-fetch-gmail-messages-and-compare-them-with-imap-retrieved-results.cs](./use-microsoft-graph-client-to-fetch-gmail-messages-and-compare-them-with-imap-retrieved-results.cs) | use microsoft graph client to fetch gmail messages and compare them with imap retrieved results | | [validate-email-addresses-in-google-contacts-using-regex-and-flag-invalid-entries-for-review.cs](./validate-email-addresses-in-google-contacts-using-regex-and-flag-invalid-entries-for-review.cs) | validate email addresses in google contacts using regex and flag invalid entries for review | | [validate-gmail-smtp-server-certificate-chain-and-enforce-tls-1-2-encryption-for-secure-transmission.cs](./validate-gmail-smtp-server-certificate-chain-and-enforce-tls-1-2-encryption-for-secure-transmission.cs) | validate gmail smtp server certificate chain and enforce tls 1 2 encryption for secure transmission | ## Category Statistics - Total examples: 142 ## 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.

