ZeptomailClient
Classes
GetMailAgentResponse
dataclass
GetProcessedEmailsResponse
dataclass
SendMailInput
dataclass
SendMailInput(mailagent_key: Optional[str] = None, bounce_address: Optional[str] = None, from_: Optional[FromAddress] = None, to: Optional[List[EmailAddressItems]] = None, cc: Optional[List[EmailAddressItems]] = None, bcc: Optional[List[EmailAddressItems]] = None, mailtype: Optional[str] = None, subject: Optional[str] = None, htmlbody: Optional[str] = None, reply_to: Optional[List[ReplyToAddress]] = None, attachments: Optional[List[Dict[str, Any]]] = None)
Send mail
Attributes
mailagent_key
class-attribute
instance-attribute
Choose Mail Agent or enter the Mail Agent key.
bounce_address
class-attribute
instance-attribute
The email address to which bounced emails will be sent.
to
class-attribute
instance-attribute
Recipient email address.
cc
class-attribute
instance-attribute
Email addresses of cc'd recipients.
bcc
class-attribute
instance-attribute
Email addresses of bcc'd recipients.
mailtype
class-attribute
instance-attribute
Format of the mail to be sent
htmlbody
class-attribute
instance-attribute
This is the body content for your email.
reply_to
class-attribute
instance-attribute
The email address to which the recipient's email responses will be addressed.
SuccessMessage
dataclass
SuccessMessage(data: Optional[List[Dict[str, Any]]] = None, message: Optional[str] = None, request_id: Optional[str] = None)
Response for Send mail
Attributes
message
class-attribute
instance-attribute
The status of the request made.
SendTemplateMailInput
dataclass
SendTemplateMailInput(mailagent_key: Optional[str] = None, bounce_address: Optional[str] = None, mail_template_key: Optional[str] = None, from_: Optional[FromAddress] = None, to: Optional[List[EmailAddressItems]] = None, cc: Optional[List[EmailAddressItems]] = None, bcc: Optional[List[EmailAddressItems]] = None, merge_key_detail: Optional[List[Dict[str, Any]]] = None, reply_to: Optional[List[ReplyToAddress]] = None)
Send template mail
Attributes
mailagent_key
class-attribute
instance-attribute
Choose Mail Agent or enter the Mail Agent key.
bounce_address
class-attribute
instance-attribute
the email address to which bounced emails will be sent.
mail_template_key
class-attribute
instance-attribute
Choose the Mail template
to
class-attribute
instance-attribute
Recipient email address.
cc
class-attribute
instance-attribute
Email addresses of cc'd recipients.
bcc
class-attribute
instance-attribute
Email addresses of bcc'd recipients.
merge_key_detail
class-attribute
instance-attribute
You can use merge tags to replace the placeholders with multiple values for different recipients.
ProcessedMailStatsResponse
dataclass
ProcessedMailStatsResponse(hb: Optional[Dict[str, Any]] = None, sb: Optional[Dict[str, Any]] = None, sent: Optional[Dict[str, Any]] = None)
Response for Processed emails analytics
FromAddress
dataclass
EmailAddress
dataclass
ReplyToAddress
dataclass
EmailAddressItems
dataclass
Definition: EmailAddressItems
ZeptomailClient
ZeptomailClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for zeptomail connector.
Initialize a ZeptomailClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
get_mail_agent_async
async
Get all Mail Agent
This endpoint fetches details of all the Mail Agents in the account. It returns data including Mail Agent name, Mail Agent key, Created time, Status. \n\nData Fields Explained:\n- mailagent_name: Name of the Mail Agent.\n- mailagent_key: Mail Agent Key.\n- mailagent_alias: Mail Agent Alias.\n- created_time: Time at which the Mail Agent was created.\n- status: Status of the Mail Agent.\n\nExample 1: To retrieve details of all Mail Agents in the ZeptoMail account. Sample prompt 1: Get me details of all the Mail Agents in the account.
get_processed_emails_async
async
get_processed_emails_async(mailagent_key: str, subject: Optional[str] = None, from_: Optional[str] = None, to: Optional[str] = None, date_from: Optional[str] = None, date_to: Optional[str] = None, request_id: Optional[str] = None, is_hb: Optional[bool] = None, is_sb: Optional[bool] = None) -> dict[str, Any] | None
Get processed email details
This endpoint fetches detailed information about emails processed by Mail Agent identified by its unique ID. It returns data including the Subject, From Address, Sent time and Request ID for emails sent for the time range. The mailagent_key parameter should match the Mail Agent key of the Mail Agent as listed in our system.
send_mail_async
async
Send mail
To send an email to the desired recipient.
send_template_mail_async
async
Send template mail
Sending a single email using Templates.
processed_mail_stats_async
async
processed_mail_stats_async(mailagent: str, from_time: Optional[str] = None, to_time: Optional[str] = None) -> dict[str, Any] | None
Processed emails analytics
This endpoint fetches emails analytics for emails sent by Mail Agent identified by its Mail Agent name. It returns data including total count of Hardbounce, Softbounce and Sent statistics over a period of time and each day . The mailagent parameter should match the Mail Agent name as listed in our system.