Skip to content

ZeptomailClient

Classes

GetMailAgentResponse dataclass

GetMailAgentResponse(data: Optional[List[Dict[str, Any]]] = None, message: Optional[str] = None)

Response for Get all Mail Agent

Attributes

data class-attribute instance-attribute
data: Optional[List[Dict[str, Any]]] = None

data

message class-attribute instance-attribute
message: Optional[str] = None

message

GetProcessedEmailsResponse dataclass

GetProcessedEmailsResponse(data: Optional[Dict[str, Any]] = None, message: Optional[str] = None)

Response for Get processed email details

Attributes

data class-attribute instance-attribute
data: Optional[Dict[str, Any]] = None

data

message class-attribute instance-attribute
message: Optional[str] = None

message

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
mailagent_key: Optional[str] = None

Choose Mail Agent or enter the Mail Agent key.

bounce_address class-attribute instance-attribute
bounce_address: Optional[str] = None

The email address to which bounced emails will be sent.

to class-attribute instance-attribute
to: Optional[List[EmailAddressItems]] = None

Recipient email address.

cc class-attribute instance-attribute
cc: Optional[List[EmailAddressItems]] = None

Email addresses of cc'd recipients.

bcc class-attribute instance-attribute
bcc: Optional[List[EmailAddressItems]] = None

Email addresses of bcc'd recipients.

mailtype class-attribute instance-attribute
mailtype: Optional[str] = None

Format of the mail to be sent

subject class-attribute instance-attribute
subject: Optional[str] = None

Subject line of your email

htmlbody class-attribute instance-attribute
htmlbody: Optional[str] = None

This is the body content for your email.

reply_to class-attribute instance-attribute
reply_to: Optional[List[ReplyToAddress]] = None

The email address to which the recipient's email responses will be addressed.

attachments class-attribute instance-attribute
attachments: Optional[List[Dict[str, Any]]] = None

Attachments

SuccessMessage dataclass

SuccessMessage(data: Optional[List[Dict[str, Any]]] = None, message: Optional[str] = None, request_id: Optional[str] = None)

Response for Send mail

Attributes

data class-attribute instance-attribute
data: Optional[List[Dict[str, Any]]] = None

data

message class-attribute instance-attribute
message: Optional[str] = None

The status of the request made.

request_id class-attribute instance-attribute
request_id: Optional[str] = None

Unique reference ID of the request.

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
mailagent_key: Optional[str] = None

Choose Mail Agent or enter the Mail Agent key.

bounce_address class-attribute instance-attribute
bounce_address: Optional[str] = None

the email address to which bounced emails will be sent.

mail_template_key class-attribute instance-attribute
mail_template_key: Optional[str] = None

Choose the Mail template

to class-attribute instance-attribute
to: Optional[List[EmailAddressItems]] = None

Recipient email address.

cc class-attribute instance-attribute
cc: Optional[List[EmailAddressItems]] = None

Email addresses of cc'd recipients.

bcc class-attribute instance-attribute
bcc: Optional[List[EmailAddressItems]] = None

Email addresses of bcc'd recipients.

merge_key_detail class-attribute instance-attribute
merge_key_detail: Optional[List[Dict[str, Any]]] = None

You can use merge tags to replace the placeholders with multiple values for different recipients.

reply_to class-attribute instance-attribute
reply_to: Optional[List[ReplyToAddress]] = None

Reply To

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

Attributes

hb class-attribute instance-attribute
hb: Optional[Dict[str, Any]] = None

Emails that have hard bounced

sb class-attribute instance-attribute
sb: Optional[Dict[str, Any]] = None

sb

sent class-attribute instance-attribute
sent: Optional[Dict[str, Any]] = None

Emails that have been sent

FromAddress dataclass

FromAddress(from_detail: Optional[Dict[str, Any]] = None, name: Optional[str] = None)

Definition: FromAddress

Attributes

name class-attribute instance-attribute
name: Optional[str] = None

Sender's user name

EmailAddress dataclass

EmailAddress(address: Optional[str] = None, name: Optional[str] = None)

Definition: EmailAddress

Attributes

address class-attribute instance-attribute
address: Optional[str] = None

Recipient's email address.

name class-attribute instance-attribute
name: Optional[str] = None

Recipient's name.

ReplyToAddress dataclass

ReplyToAddress(address: Optional[str] = None, name: Optional[str] = None)

Definition: ReplyToAddress

Attributes

address class-attribute instance-attribute
address: Optional[str] = None

A valid email address containing a domain that is verified in your Mail Agent.

name class-attribute instance-attribute
name: Optional[str] = None

Name for the reply-to.

EmailAddressItems dataclass

EmailAddressItems(email_address: Optional[EmailAddress] = None)

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_mail_agent_async() -> dict[str, Any] | None

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_async(input: SendMailInput) -> dict[str, Any] | None

Send mail

To send an email to the desired recipient.

send_template_mail_async async
send_template_mail_async(input: SendTemplateMailInput) -> dict[str, Any] | None

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.