SMTP2GO ACTION
Send Single Email
Send a single email with SMTP2GO (See docs here)
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's SMTP2GO account once, then configure and run Send Single Email from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "smtp2go-send-single-email",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
smtp2go: { authProvisionId: "apn_xxxxxxx" },
subject: "Subject",
htmlBody: "HTML Body",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "smtp2go-send-single-email",
"configured_props": {
"smtp2go": { "authProvisionId": "apn_xxxxxxx" },
"subject": "Subject",
"htmlBody": "HTML Body"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "smtp2go",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "smtp2go-send-single-email",
arguments: {
subject: "Subject",
htmlBody: "HTML Body",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
subject Subject | string | Email subject. Required |
htmlBody HTML Body | string | HTML email message.
Required if no Text Body is specified. Optional |
textBody Text Body | string | Plain text email message.
Required if no HTML Body is specified. Optional |
fromEmail "From" email address | string | The sender email address. To include a name, use the format 'Full Name <sender@domain.com>' for the address. Required |
toEmail Recipient email address(es) | string[] | Recipient email address. Max 50. Required |
ccEmail CC email address(es) | string[] | Cc recipient email address. Max 50. Optional |
bccEmail BCC email address(es) | string[] | Bcc recipient email address. Max 50. Optional |
replyTo "Reply To" email address | string | Reply To override email address. Defaults to the Reply To set in the sender signature. Optional |
customHeaders Custom Headers | string[] | List of custom headers to include.
Each attachment should be a string with the parameters separated by a pipe character |, in the format: header|value. Alternatively, you can pass a string representing an object. Both parameters are required:
header - the header key name, i.e. some-header
value - the string value of the header, i.e. the-value
Example with pipe-separated parameters: some-custom-header|the-value
Example with JSON-stringified object: {"header":"some-custom-header","value":"the-value"} Optional |
attachments Attachments | string[] | List of attachments to include.
Each attachment should be a string with the parameters separated by a pipe character |, in the format: Name|Content|ContentType. Alternatively, you can pass a string representing an object. All three parameters are required:
filename - the filename with extension, i.e. readme.txt
fileblob - the base64-encoded string with the binary data for the file, i.e. dGVzdCBjb250ZW50
mimetype - the MIME content type, i.e. text/plain
Example with pipe-separated parameters: readme.txt|dGVzdCBjb250ZW50|text/plain
Example with JSON-stringified object: {"filename":"readme.txt","fileblob":"dGVzdCBjb250ZW50","mimetype":"text/plain"} Optional |
ignoreFailures Ignore Failures | boolean | Should this action ignore failures to send an email? Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- smtp2go-send-single-email
- Version
- 0.0.3
- App
- SMTP2GO
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗