๐Ÿ“ง Email MCP Server Configuration (SMTP/Gmail)

Complete guide to allow AI4CALL assistant to automatically send emails to customers via SMTP server or Gmail

AI4CALL - Email MCP Server Configuration (SMTP/Gmail)

Go to "MARKET" โ†’ "Marketplace Plugin" and click Purchase on "Email (smtp)" โ†’ FREE

Go to "MARKET" โ†’ "My Plugins" and click Configure on "Email (smtp)"

โš ๏ธ Third-party services

The integrations described refer to third-party services.
Rate limits, authentication methods, technical configurations, costs, and policies are defined exclusively by the respective providers and may change over time.

Costs for external services are borne directly by the end user to the service providers themselves and are in no way managed or mediated by our portal (e.g., Meta or other providers for WhatsApp, Zapier, Calendly, etc.).

๐Ÿ’ก When to use Email MCP Server
The AI assistant can automatically send emails for:

  • โœ… appointment confirmations with date/time/location details
  • โœ… call summaries with key discussed points
  • โœ… document/brochure/price list sending via attachment
  • โœ… order confirmations with tracking number
  • โœ… deadline/payment/renewal reminders
  • โœ… support tickets with reference number
  • โœ… post-call follow-up with links/resources

Advantages: customer receives immediate written confirmation without waiting for manual email from operator.

1

What is Email MCP Server and how it works

Email MCP Server is a tool allowing AI assistant to send emails during or at end of calls via standard SMTP protocol.

๐Ÿ“จ how email sending works:
1. During call:
โ†’ assistant collects customer email and relevant data
โ†’ example: "Can you provide your email to send you confirmation?"

2. Content generation:
โ†’ assistant automatically generates subject and email body
โ†’ personalizes with conversation data (name, appointment, requests)
โ†’ can use plain text or formatted HTML format

3. Sending via SMTP:
โ†’ assistant invokes send_email tool with compiled parameters
โ†’ email is sent via configured SMTP server
โ†’ customer receives email immediately

4. Confirmation to customer:
โ†’ assistant communicates: "I sent you confirmation email to [address]"
โ†’ customer can verify in real time during call
๐Ÿ”ง Configuration options: custom SMTP vs Gmail
Option 1 - Company SMTP server:
  • โœ… uses company domain email (@yourcompany.com)
  • โœ… greater control and customization
  • โœ… professional branding
  • โš ๏ธ requires SMTP credentials from email provider

Option 2 - Gmail (smtp.gmail.com):
  • โœ… quick setup with existing Gmail account
  • โœ… high reliability
  • โœ… email history in Gmail sent
  • โš ๏ธ limit ~500 emails/day (Gmail free) or ~2,000/day (Workspace)
  • โš ๏ธ requires app password (not normal Gmail password)

Recommendation: Gmail to start quickly, company SMTP for professional production.
โš ๏ธ Configuration requirements
Before configuring, ensure you have:

For company SMTP:
  • SMTP Host (e.g. mail.yourdomain.com, smtp.provider.com)
  • SMTP Port (465 for SSL, 587 for TLS)
  • SMTP Username (typically: your-email@domain.com)
  • SMTP Password
  • Security protocol (SSL or TLS)

For Gmail:
  • Active Gmail account
  • 2-step verification enabled
  • App password generated (NOT normal Gmail password!)

If you don't have this information, contact your email provider or IT administrator before proceeding.
2

Configure the SMTP server

Insert SMTP server credentials to allow email sending.

๐ŸŽฏ SMTP configuration fields:
SMTP Host: outgoing mail server address
โ†’ e.g. mail.example.com, smtp.gmail.com, smtp.office365.com
โ†’ provided by email provider

SMTP Port: server communication port
โ†’ 465 for SSL (Secure Socket Layer)
โ†’ 587 for TLS (Transport Layer Security) - recommended
โ†’ 25 not secure - deprecated, avoid

SMTP Username: email account for authentication
โ†’ e.g. no-reply@example.com, assistant@company.com
โ†’ typically matches sender email

SMTP Password: email account password
โ†’ for Gmail: use app password (not account password!)
โ†’ keep it secure, do not share

Security: encryption protocol
โ†’ SSL if port 465
โ†’ TLS if port 587

Sender Name (optional): displayed name
โ†’ e.g. AI4CALL Assistant, Customer Support
โ†’ appears as display name in recipient email client
๐Ÿ“ง Gmail Configuration - complete procedure
Steps to configure Gmail SMTP:
  1. Enable 2-step verification:
    โ†’ go to myaccount.google.com/security
    โ†’ enable "Two-step verification" if not already enabled
  2. Generate app password:
    โ†’ go to myaccount.google.com/apppasswords
    โ†’ select app: "Mail", device: "Other (custom name)"
    โ†’ enter name: "AI4CALL SMTP"
    โ†’ click "Generate"
    โ†’ COPY the 16-character password shown (won't be visible again!)
  3. Configure in AI4CALL:
    โ†’ SMTP Host: smtp.gmail.com
    โ†’ SMTP Port: 587 (or 465)
    โ†’ SMTP Username: your-email@gmail.com
    โ†’ SMTP Password: [16-character generated password]
    โ†’ Security: TLS (or SSL if port 465)
    โ†’ Sender Name: AI Assistant
  4. Save configuration

IMPORTANT: never use normal Gmail password - Google will block access as "less secure". ALWAYS use app password.
๐Ÿ”’ SMTP credentials security
SMTP credentials guarantee complete access to email sending from your account:

Protection:
  • ๐Ÿ”’ keep SMTP password in secure password manager
  • ๐Ÿ”’ do not share credentials with third parties
  • ๐Ÿ”’ use dedicated email account (e.g. no-reply@) instead of personal email
  • ๐Ÿ”’ monitor sending logs for anomalous activity
  • ๐Ÿ”’ change password periodically (every 6-12 months)

If suspect compromise: revoke Gmail app password, change company SMTP password, verify recent sending logs.
SMTP Configuration
"SMTP Server Configuration" panel: inserting host, port, credentials, security and sender name
3

Configure email template options

Customize how the assistant generates and sends emails to customers.

๐ŸŽจ available options:
Use HTML content (toggle):
โ†’ OFF: assistant sends only plain text emails
โ†’ ON: assistant can send formatted HTML emails (colors, images, links)

When to enable HTML:
  • โœ… want professional emails with company branding
  • โœ… need formatting (bold, lists, tables)
  • โœ… want to include logo or images
  • โœ… clickable links with button design

When to use only text:
  • โœ… maximum compatibility with all email clients
  • โœ… simple and fast emails
  • โœ… avoid spam filters (HTML can trigger spam)
๐Ÿงช Test Mode: how it works
Test Mode allows sending test emails without consuming credits:

Functioning:
  • โœ… limit 10 total test emails
  • โœ… emails are sent ACTUALLY to recipients
  • โœ… email subject contains prefix [TEST] automatically
  • โœ… doesn't consume email credits (if system has sending costs)

When to use Test Mode:
  • ๐Ÿ“ง verify SMTP configuration correct
  • ๐Ÿ“ง test HTML templates generated by AI
  • ๐Ÿ“ง check formatting on different clients (Gmail, Outlook, Apple Mail)
  • ๐Ÿ“ง validate workflow with BCC and attachments

After test: disable Test Mode for production use. Emails won't have [TEST] prefix anymore.
๐Ÿ’ก Best practice: HTML + Text
Recommended configuration:

1. Enable "Use HTML content"
2. Instruct assistant in prompt to ALWAYS include both text and html versions:

"When sending emails, always generate content in two formats:
- parameter 'text': simple text readable version
- parameter 'html': formatted version with company colors (#2563EB blue), logo, professional formatting

Include both for maximum compatibility. Old email clients or with HTML disabled will show text version."


Advantages: maximum compatibility + professional design + avoid spam filters.
4

Test email sending

Verify SMTP configuration works correctly before production use.

โœ… test procedure:
  1. Enable Test Mode (if available)
  2. Save SMTP configuration
  3. Make a test call to assistant
  4. Ask assistant to send you a test email:
    โ†’ e.g. "Send me a test email to test@youremail.com"
  5. The assistant should invoke send_email with parameters
  6. Verify email reception:
    • Check test email inbox
    • Check spam folder if not arriving
    • Verify subject contains [TEST] if test mode active
    • Check sender (name and email correct?)
    • Verify HTML formatting if enabled
  7. Test on different clients:
    โ†’ Gmail web, Outlook, Apple Mail, mobile client
    โ†’ HTML rendering varies between clients
โœ… Email received correctly!
If email arrives with:
  • โœ… correct sender (name and address)
  • โœ… correct subject (with [TEST] if test mode)
  • โœ… content formatted as expected
  • โœ… doesn't end in spam

โ†’ Configuration correct! Disable Test Mode and switch to production use.

Also test:
  • ๐Ÿ“ง sending with BCC (verify BCC recipient receives but doesn't appear in header)
  • ๐Ÿ“ง complex HTML content (tables, images, links)
  • ๐Ÿ“ง long emails (>1000 characters)
โŒ Troubleshooting: email not arriving
Possible causes and solutions:

1. SMTP authentication error:
  • โ†’ verify correct username/password
  • โ†’ Gmail: use app password, not account password
  • โ†’ check AI4CALL log for specific error

2. Wrong port/security:
  • โ†’ port 465 requires SSL
  • โ†’ port 587 requires TLS
  • โ†’ try alternating 465โ†”587 and SSLโ†”TLS

3. Email in spam:
  • โ†’ check spam/junk folder
  • โ†’ add sender to contacts
  • โ†’ verify domain SPF/DKIM configuration

4. Firewall blocks SMTP:
  • โ†’ verify firewall allows ports 465/587 outbound
  • โ†’ some ISPs block port 25
5

Instruct the assistant for email workflows

Configure the assistant prompt to correctly use send_email in common workflows.

๐Ÿ“ Recommended workflows to insert in prompt
1. Automatic appointment confirmation:
"At end of appointment booking, automatically send confirmation email to customer. Include: customer name, appointment date/time, location address, what to bring/prepare. Subject: 'Appointment confirmation [DATE]'. Format: HTML with company logo in header."

2. Call summary:
"If call lasts >5 minutes and contains important information, ask customer if they want summary via email. If yes, generate email with: personalized greeting, key discussed points (bulleted list), next steps, support contacts. Format: professional HTML."

3. Documentation sending:
"If customer requests brochures/price lists/documents, send email with download links materials. Subject: 'Requested documentation - [TYPE]'. Body: materials description, download links, offer validity deadline if applicable."

4. Support ticket with BCC team:
"For technical support requests, create ticket and send email to customer with ticket number. Put in BCC: support@company.com. Subject: 'Ticket #[NUMBER] - [PROBLEM]'. Communicate to customer: 'will receive response within 24 hours'."
๐Ÿ’ก HTML template generated by AI: example
The assistant can generate professional HTML if instructed. Specific prompt example:

"Standard email HTML template:
- Header: background #2563EB (blue), logo centered, padding 20px
- Body: background #FFFFFF, max-width 600px, font Arial 14px
- H1: color #1F2937, font-size 24px, margin-bottom 16px
- Paragraphs: color #4B5563, line-height 1.6
- Lists: bullet with color #2563EB
- Footer: background #F3F4F6, padding 20px, font-size 12px, company contacts
- CTA Button: background #2563EB, color white, padding 12px 24px, border-radius 6px"

AI will dynamically adapt template to specific call data!

โ“ Frequently asked questions

Answers to the most common questions about Email MCP Server (SMTP/Gmail)

Yes. Configure SMTP Host: smtp.gmail.com, Port: 465 (SSL) or 587 (TLS), Username: your Gmail email. For password you must generate an "app password" from Google Account โ†’ Security โ†’ Two-step verification โ†’ App passwords. Do not use normal Gmail password - Google would block it as non-secure access.

Port 465 uses SSL (Secure Socket Layer) with encrypted connection from start. Port 587 uses TLS (Transport Layer Security) with STARTTLS upgrade. Both are secure - 587 is more modern and recommended. If 587 doesn't work, try 465. Port 25 (not secure) is deprecated and blocked by many providers - avoid it.

Test Mode allows sending up to 10 test emails with AI4CALL SMTP. Emails are actually sent to recipients but with "[TEST]" added in subject. Use this mode to immediately verify usage with AI assistant.

Yes, the send_email tool supports "attachments" parameter accepting array of files. However the AI assistant cannot create files during call - attachments must be existing files accessible to system. Typical workflow: generate document with another tool (e.g. generate PDF with n8n/Zapier), obtain file URL/path, pass to send_email as attachment.

Parameter "text" contains plain text version of email (without formatting). Parameter "html" contains HTML version with formatting, colors, images, links. Best practice: always include both - old email clients or with HTML disabled will show text version. If send only html, some clients might block email as spam.

Yes. Sender name configures in "Sender Name" (e.g. "AI4CALL Assistant") - appears as display name. Sender address default is "SMTP Username"; to override for single email, specify in prompt. Attention: many SMTP servers block unverified senders - use only addresses of your domain.

Use parameter "ccn" (copia carbone nascosta) of send_email tool. Accepts string with single address (ccn="manager@company.com") or multiple addresses separated by comma (ccn="manager@company.com","support@company.com"). BCC recipients receive email but don't appear in header - useful to keep team informed without customer knowing.

Parameter "to" accepts single recipient. For multiple sending there are two approaches: (1) assistant invokes send_email multiple times (one per recipient) - not recommended for large numbers, (2) use CC parameter for visible recipients or BCC for hidden ones.

The assistant will receive error when trying to send email and can inform user "unable to send email, contact support". Common errors: wrong SMTP host (connection refused), wrong port (timeout), invalid credentials (authentication failed), non-matching security (SSL vs TLS mismatch). Use Test Mode to verify configuration before real use.

Yes, you MUST use your SMTP. Search provider documentation: "SMTP configuration" or "outgoing mail server settings", configure and test the service.

Depends on: (1) sender domain reputation - new domains more easily end in spam, (2) domain SPF/DKIM/DMARC configuration, (3) email content - too many links/images/spam words trigger filters, (4) sending volume - sudden spikes get flagged. Best practice: use verified company domain, include text version, avoid excessive UPPERCASE, link shorteners, exe/zip attachments.

Depends on configured SMTP server, not AI4CALL. Gmail free: ~500 emails/day. Gmail Workspace: ~2,000 emails/day. Dedicated SMTP servers: configurable limits. For high volumes (1,000+ emails/day), use dedicated transactional services (SendGrid 100 emails/day free, then paid, AWS SES $0.10 per 1,000 emails). AI4CALL imposes no own limits.

Instruct assistant to handle gracefully: "If send_email fails, inform customer: 'I couldn't send confirmation email. I'll provide details via SMS/call'. Don't insist with automatic retries - might be temporary SMTP problem. Save data for manual sending later via Zapier/n8n." Avoid assistant telling technical errors to customer.

Yes, with HTML tag pointing to public URLs: . Images must be hosted online (not inline Base64 attachments - many clients block). Best practice: use reliable CDN for images, specify width/height for stable layout, include alt text for accessibility, test on different clients (Gmail, Outlook, Apple Mail).

Yes, if correctly instructed in prompt. LLM can generate complete HTML with: branded header, formatted text, bulleted lists, tables, footer with contacts, company colors. Provide in prompt: brand colors (e.g. #2563EB primary blue), desired structure (header/body/footer), variable content to insert. AI dynamically adapts template to conversation data.

Absolutely. Common workflows: (1) Calendly verifies availability โ†’ Email sends appointment confirmation, (2) CSV Custom searches customer โ†’ Email sends data summary, (3) Condomatica verifies fees โ†’ Email sends payment reminder, (4) n8n creates ticket โ†’ Email confirms to customer. Tools are composable - LLM orchestrates optimal sequence automatically.

Depends. If using Gmail SMTP (smtp.gmail.com), emails appear in Sent Mail of configured Gmail account. If using custom SMTP server, depends on server configuration - some save in sent folder, others don't. Gmail SMTP advantages: complete history in Gmail, visibility of conversation threads, easy search. Disadvantage: counts in Gmail daily limits.


Some of the ai4call users