graph LR
InboundParseDataParser["InboundParseDataParser"]
ConfigurationManagement["ConfigurationManagement"]
TestPayloadSender["TestPayloadSender"]
InboundParseDataParser -- "uses configuration from" --> ConfigurationManagement
TestPayloadSender -- "retrieves configuration from" --> ConfigurationManagement
TestPayloadSender -- "simulates input for" --> InboundParseDataParser
The Inbound Email Processing subsystem is designed to handle and parse incoming emails received via SendGrid's Inbound Parse webhook. It leverages a Configuration Management component to load necessary settings, such as parsing keys and environment variables. The core parsing functionality is provided by the Inbound Parse Data Parser, which extracts key-value pairs and decodes attachments from the incoming payload. A Test Payload Sender component is also included to facilitate the simulation of inbound parse webhooks for testing purposes, utilizing the same configuration settings.
This component is responsible for parsing incoming data from SendGrid's Inbound Parse webhook. It extracts key-value pairs from the payload and specifically handles the extraction and decoding of attachments, supporting both standard multipart form data and raw email formats.
Related Classes/Methods:
sendgrid.helpers.inbound.parse.Parse(9:100)sendgrid.helpers.inbound.parse.Parse:attachments(40:52)sendgrid.helpers.inbound.parse.Parse._get_attachments(54:64)sendgrid.helpers.inbound.parse.Parse.get_raw_email(29:38)sendgrid.helpers.inbound.parse.Parse._get_attachments_raw(66:84)
This component is responsible for loading configuration settings for the application. It initializes environment variables from a .env file and loads application-specific settings from config.yml, providing access to properties like debug mode, endpoint, host, keys, and port.
Related Classes/Methods:
sendgrid.helpers.inbound.config.Config(6:65)sendgrid.helpers.inbound.config.Config:__init__(9:24)sendgrid.helpers.inbound.config.Config.init_environment(27:38)
This component facilitates sending test payloads to a specified URL, simulating an inbound parse webhook. It handles the creation of HTTP requests with appropriate headers and data, and reports the response status, headers, and body.
Related Classes/Methods: