Email Access
Send and receive emails via SMTP, IMAP, and POP3 protocols.
Endpoint
POST https://www.acrewity.com/api/services/execute
Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
n8n Integration
This service is also available via our n8n community node: @acrewity/n8n-nodes-acrewity
Operations
Send Email
Send emails via SMTP
Operation ID: send_email
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
smtp_host |
string | Yes | - | SMTP server hostname |
smtp_user |
string | Yes | - | SMTP username/email |
smtp_pass |
string | Yes | - | SMTP password/app password |
to |
string | Yes | - | Recipient email address |
subject |
string | Yes | - | Email subject |
smtp_port |
number | No | 587 |
SMTP port |
smtp_secure |
boolean | No | false |
Use SSL/TLS |
from |
string | No | - | From address (defaults to smtp_user) |
text |
string | No | - | Plain text content |
html |
string | No | - | HTML content |
Example Request
Send Order Confirmation:
{
"service": "email-access",
"operation": "send_email",
"parameters": {
"smtp_host": "smtp.sendgrid.net",
"smtp_port": 587,
"smtp_user": "apikey",
"smtp_pass": "YOUR_SENDGRID_API_KEY",
"from": "orders@yourstore.com",
"to": "customer@example.com",
"subject": "Order Confirmed - #ORD-2024-5678",
"html": "<h1>Thank you for your order!</h1><p>Your order #ORD-2024-5678 has been confirmed.</p><p>Estimated delivery: January 18, 2025</p>"
}
}
Send with Gmail:
{
"service": "email-access",
"operation": "send_email",
"parameters": {
"smtp_host": "smtp.gmail.com",
"smtp_port": 587,
"smtp_user": "your-email@gmail.com",
"smtp_pass": "your-app-password",
"to": "recipient@example.com",
"subject": "Weekly Report - Sales Dashboard",
"text": "Here is your weekly sales report...",
"html": "<h2>Weekly Sales Report</h2><p>Revenue: $12,500</p><p>Orders: 145</p>"
}
}
Example Response
{
"success": true,
"result": {
"data": {
"messageId": "<abc123.1735567890@mail.example.com>",
"to": "customer@example.com",
"subject": "Order Confirmed - #ORD-2024-5678",
"sent": true,
"response": "250 OK id=1tXYZ-00ABC-12"
}
},
"credits_used": 1
}
Fetch Emails (POP3)
Retrieve emails via POP3
Operation ID: fetch_emails_pop3
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pop3_host |
string | Yes | - | POP3 server hostname |
pop3_user |
string | Yes | - | POP3 username/email |
pop3_pass |
string | Yes | - | POP3 password/app password |
pop3_port |
number | No | 110 |
POP3 port |
pop3_secure |
boolean | No | false |
Use TLS/SSL |
limit |
number | No | 10 |
Maximum emails to fetch (max: 100) |
Example Request
{
"service": "email-access",
"operation": "fetch_emails_pop3",
"parameters": {
"pop3_host": "pop.gmail.com",
"pop3_port": 995,
"pop3_secure": true,
"pop3_user": "your-email@gmail.com",
"pop3_pass": "your-app-password",
"limit": 10
}
}
Fetch Single Email (POP3)
Retrieve a specific email by ID from POP3 account
Operation ID: fetch_email_pop3
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pop3_host |
string | Yes | - | POP3 server hostname |
pop3_user |
string | Yes | - | POP3 username/email |
pop3_pass |
string | Yes | - | POP3 password/app password |
email_id |
number | Yes | - | Email message number |
pop3_port |
number | No | 110 |
POP3 port |
pop3_secure |
boolean | No | false |
Use TLS/SSL |
Example Request
{
"service": "email-access",
"operation": "fetch_email_pop3",
"parameters": {
"pop3_host": "pop.gmail.com",
"pop3_port": 995,
"pop3_secure": true,
"pop3_user": "your-email@gmail.com",
"pop3_pass": "your-app-password",
"email_id": 5
}
}
Fetch Emails (IMAP)
Retrieve multiple emails from IMAP account
Operation ID: fetch_emails
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
imap_host |
string | Yes | - | IMAP server hostname |
imap_user |
string | Yes | - | IMAP username/email |
imap_pass |
string | Yes | - | IMAP password/app password |
imap_port |
number | No | 993 |
IMAP port |
imap_secure |
boolean | No | true |
Use TLS/SSL |
folder |
string | No | INBOX |
Mailbox folder |
limit |
number | No | 10 |
Maximum emails to fetch (max: 100) |
Example Request
{
"service": "email-access",
"operation": "fetch_emails",
"parameters": {
"imap_host": "imap.gmail.com",
"imap_port": 993,
"imap_secure": true,
"imap_user": "support@yourcompany.com",
"imap_pass": "your-app-password",
"folder": "INBOX",
"limit": 25
}
}
Example Response
{
"success": true,
"result": {
"data": {
"emails": [
{
"id": 1,
"from": "customer@example.com",
"subject": "Question about my order",
"date": "2025-01-15T10:30:00Z",
"text": "Hi, I wanted to ask about..."
}
],
"totalCount": 25
}
},
"credits_used": 1
}
Fetch Single Email (IMAP)
Retrieve a specific email by ID from IMAP account
Operation ID: fetch_email
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
imap_host |
string | Yes | - | IMAP server hostname |
imap_user |
string | Yes | - | IMAP username/email |
imap_pass |
string | Yes | - | IMAP password/app password |
email_id |
number | Yes | - | Email ID/sequence number |
imap_port |
number | No | 993 |
IMAP port |
imap_secure |
boolean | No | true |
Use TLS/SSL |
folder |
string | No | INBOX |
Mailbox folder |
Example Request
{
"service": "email-access",
"operation": "fetch_email",
"parameters": {
"imap_host": "imap.gmail.com",
"imap_port": 993,
"imap_secure": true,
"imap_user": "support@yourcompany.com",
"imap_pass": "your-app-password",
"email_id": 42,
"folder": "INBOX"
}
}
Mark Email as Read (IMAP)
Mark a specific email as read in IMAP account
Operation ID: mark_as_read
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
imap_host |
string | Yes | - | IMAP server hostname |
imap_user |
string | Yes | - | IMAP username/email |
imap_pass |
string | Yes | - | IMAP password/app password |
email_id |
number | Yes | - | Email ID/sequence number |
imap_port |
number | No | 993 |
IMAP port |
imap_secure |
boolean | No | true |
Use TLS/SSL |
folder |
string | No | INBOX |
Mailbox folder |
Example Request
{
"service": "email-access",
"operation": "mark_as_read",
"parameters": {
"imap_host": "imap.gmail.com",
"imap_port": 993,
"imap_secure": true,
"imap_user": "support@yourcompany.com",
"imap_pass": "your-app-password",
"email_id": 42,
"folder": "INBOX"
}
}
More Examples
See Email Automation Examples for complete workflow examples including order confirmations, password resets, inbox monitoring, and automated reports.