Smtp2go

Learn how to use Smtp2go with Composio

Overview

SLUG: SMTP2GO

Description

SMTP2GO is a reliable email delivery service that ensures your emails reach recipients’ inboxes efficiently.

Authentication Details

generic_api_key
stringRequired

Connecting to Smtp2go

Create an auth config

Use the dashboard to create an auth config for the Smtp2go toolkit. This allows you to connect multiple Smtp2go accounts to Composio for agents to use.

1

Select App

Navigate to Smtp2go.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Smtp2go Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4smtp2go_auth_config_id = "ac_YOUR_SMTP2GO_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Smtp2go for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, smtp2go_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Smtp2go toolkit’s playground

For code examples, see the Tool calling guide and Provider examples.

Tool List

Tool Name: Add Allowed Sender

Description

Tool to add a new allowed sender email address. Use when you need to whitelist a sender before sending email. Example: Add "user@example.com" to allowed senders list.

Action Parameters

email_address
stringRequired

Action Response

data
objectRequired
error
error_code
integerRequired
error_message
successful
booleanRequired

Tool Name: Remove Allowed Sender

Description

Tool to remove a sender email address from the allowed senders list. Use when you need to revoke send permissions for a validated address.

Action Parameters

email_address
stringRequired

Action Response

data
error
error_code
error_message
successful
booleanRequired

Tool Name: Update Allowed Sender

Description

Tool to update details of an existing allowed sender. Use after confirming the allowed_sender_id.

Action Parameters

allowed_sender_id
stringRequired
email_address
name
reply_prompt

Action Response

data
objectRequired
error
request_id
stringRequired
successful
booleanRequired

Tool Name: View Allowed Senders

Description

Tool to view the list of allowed senders configured in your account. Use after setting up SMTP2GO authentication to retrieve your allowed-senders list. Example: 'Show me all verified allowed senders.'

Action Parameters

limit
offset
sender_email
verified

Action Response

data
arrayRequired
error
error_code
integerRequired
request_id
stringRequired
successful
booleanRequired
total
integerRequired

Tool Name: Add Sender Domain

Description

Tool to add a new sender domain for SPF/DKIM verification. Use when you need to register a domain and optionally set tracking/return-path subdomains.

Action Parameters

auto_verify
domain
stringRequired
returnpath_subdomain
subaccount_id
tracking_subdomain

Action Response

data
objectRequired
error
request_id
stringRequired
successful
booleanRequired

Tool Name: Add IP Allow List

Description

Tool to add an IP address or CIDR range to your account’s IP allow list. Use when you need to whitelist specific sending sources by IP or CIDR after confirming accuracy.

Action Parameters

ip
stringRequired
note

Action Response

data
objectRequired
error
error_code
integerRequired
error_message
successful
booleanRequired

Tool Name: Remove IP from Allow List

Description

Tool to remove an IP address from your account's IP allow list. Use after identifying the IP you wish to revoke.

Action Parameters

ip_address
stringRequired

Action Response

data
objectRequired
error
status
stringRequired
successful
booleanRequired

Tool Name: View IP Allow List

Description

Tool to view the list of IP addresses in your IP allow list. Use after confirming your SMTP2GO API key is set.

Action Parameters

Action Response

data
arrayRequired
error
error_code
successful
booleanRequired

Tool Name: View Received SMS

Description

Tool to retrieve received SMS replies for your SMTP2GO account. Use when you need to fetch incoming SMS messages for analysis or display. Pagination supported via limit and offset.

Action Parameters

limit
Defaults to 100
offset

Action Response

data
arrayRequired
error
error_code
integerRequired
successful
booleanRequired
total
integerRequired

Tool Name: Get Email Bounces Stats

Description

Tool to retrieve email bounces statistics. Use after sending emails to analyze bounce metrics over a time period.

Action Parameters

date_end
date_start
email
limit
offset
sort_direction
sort_field

Action Response

data
arrayRequired
error
error_code
error_message
success
booleanRequired
successful
booleanRequired
total
integerRequired

Tool Name: Email Cycle Statistics

Description

Tool to retrieve email cycle statistics. Use when you need to analyze email delivery metrics over a specified date range.

Action Parameters

date_from
stringRequired
date_to
stringRequired
group_by
stringDefaults to day
grouping
limit
offset

Action Response

data
arrayRequired
error
successful
booleanRequired
total
integerRequired

Tool Name: Email History Statistics

Description

Tool to retrieve email history statistics. Use when you need detailed delivery metrics within a date range.

Action Parameters

date_end
date_start
email
limit
Defaults to 50
offset
sender
tag

Action Response

data
arrayRequired
error
request_id
stringRequired
successful
booleanRequired
total
integerRequired

Tool Name: Email Spam Statistics

Description

Tool to retrieve email spam report statistics. Use when analyzing spam trends for sent emails.

Action Parameters

date_end
stringRequired
date_start
stringRequired
limit
Defaults to 100
offset
recipient
sender
transaction_id

Action Response

data
arrayRequired
error
error_code
error_message
successful
booleanRequired

Tool Name: Email Unsubscription Stats

Description

Tool to retrieve email unsubscribe statistics. Use when you need unsubscribe data for your account over a date range.

Action Parameters

date_end
date_start
email_address
result_limit
Defaults to 1000
result_offset

Action Response

data
arrayRequired
error
error_code
integerRequired
error_message
request_id
stringRequired
successful
booleanRequired

Tool Name: Subaccounts Usage

Description

Tool to retrieve usage statistics for subaccounts. Use when you need to monitor per-subaccount email usage.

Action Parameters

subaccount_id

Action Response

data
objectRequired
error
request_id
stringRequired
successful
booleanRequired

Tool Name: Add to Suppression List

Description

Tool to add email addresses or domains to the suppression list. Use when you need to block sending emails to specific recipients or entire domains after unsubscribes or bounces.

Action Parameters

description
email_address
Required
type
stringDefaults to EMAIL

Action Response

data
objectRequired
error
failed
array
succeeded
booleanRequired
successful
booleanRequired

Tool Name: Remove suppression entry

Description

Tool to remove an email address or domain from the suppression list. Use when you want to resume sending to the address or domain.

Action Parameters

domain
email
subaccount_id

Action Response

data
objectRequired
error
request_id
stringRequired
successful
booleanRequired

Tool Name: View Suppression List

Description

Tool to view the suppression list. Use when you need to inspect suppressed email addresses in your account.

Action Parameters

email_address
end_date
limit
Defaults to 100
offset
start_date
suppression_type

Action Response

data
arrayRequired
error
status
stringRequired
successful
booleanRequired
total
integerRequired

Tool Name: Edit Email Template

Description

Tool to edit details of an existing email template. Use when you need to update template properties after confirming its ID.

Action Parameters

editor_code
html_body
is_archived
name
subject
template_id
stringRequired
text_body

Action Response

data
objectRequired
error
error_code
successful
booleanRequired

Tool Name: View Email Template

Description

Tool to view details of a specific email template. Use after you have the template ID to inspect.

Action Parameters

template_id
stringRequired

Action Response

data
objectRequired
error
error_code
request_id
stringRequired
successful
booleanRequired

Tool Name: Add SMTP User

Description

Tool to add a new SMTP user. Use when you need to provision a fresh SMTP credential after collecting username and password.

Action Parameters

user_data
objectRequired

Action Response

data
objectRequired
error
request_id
stringRequired
successful
booleanRequired

Tool Name: Edit SMTP User

Description

Tool to edit details of an existing SMTP user. Use when you need to update username, password, sender restrictions, or enable/disable a user after confirming the target username.

Action Parameters

allow_senders
allowed_ips
disable_senders
disabled
new_username
password
reset_stats
sender_domain
username
stringRequired

Action Response

data
objectRequired
error
error_code
integerRequired
error_message
successful
booleanRequired

Tool Name: Remove SMTP User

Description

Tool to remove an SMTP user from your account. Use when you need to revoke SMTP access for a user.

Action Parameters

username
stringRequired

Action Response

data
objectRequired
error
request_id
stringRequired
successful
booleanRequired

Tool Name: View SMTP Users

Description

Tool to list all SMTP users configured on your account. Use when you need to retrieve SMTP user configurations.

Action Parameters

Action Response

data
arrayRequired
error
error_code
successful
booleanRequired

Tool Name: Add Webhook

Description

Tool to create a new webhook. Use when you need real-time notifications of email or SMS events.

Action Parameters

events
arrayRequired
name
webhook_url
stringRequired

Action Response

data
objectRequired
error
error_code
integerRequired
error_message
successful
booleanRequired

Tool Name: Edit Webhook

Description

Tool to edit an existing webhook’s settings. Use when you need to update a webhook's configuration after creation.

Action Parameters

authorization_header
email_events
email_headers
output_type
sms_events
url
users
webhook_id
stringRequired

Action Response

data
objectRequired
error
error_code
integerRequired
error_message
successful
booleanRequired

Tool Name: Remove webhook

Description

Tool to remove a webhook. Use when you want to delete a webhook by its ID from your SMTP2GO account.

Action Parameters

webhook_id
stringRequired

Action Response

data
objectRequired
error
error_code
integerRequired
error_message
stringRequired
successful
booleanRequired

Tool Name: View Webhooks

Description

Tool to view all webhooks configured in your account. Use when you need to inspect existing webhook configurations after setup.

Action Parameters

subaccount_id

Action Response

data
arrayRequired
error
error_code
integerRequired
error_message
successful
booleanRequired