Placement Prep

Automation Anywhere Send Email Command: 2026 SMTP and HTML Setup Guide

Set up the Send Email command in Automation Anywhere: SMTP config, Gmail App Passwords, HTML formatting, and fixes for the most common email bot errors.

By FACE Prep Team 5 min read
automation-anywhere rpa send-email smtp email-automation bot-development placement-prep

The Send Email command in Automation Anywhere handles SMTP-based email delivery from within a bot, covering multiple recipients, HTML formatting, and file attachments in a single action.

That sentence sounds simple. In practice, most students hit two friction points before the first successful run: the interface moved between versions, and Gmail’s authentication requirements changed in 2022. Both are fixable in under ten minutes once you know what changed.

What the Send Email Command Does

Automation Anywhere’s Send Email command lets a bot send email without a human sitting at a mail client. The core use cases for freshers building their first automation portfolio: sending automated test reports, triggering notifications when a process completes, and attaching generated files (Excel exports, PDFs) to stakeholder-facing emails.

The command covers:

  • Multiple recipients: list addresses in To, CC, and BCC fields separated by semicolons
  • File attachments: static file paths or dynamic paths resolved at runtime via variables
  • HTML formatting: compose rich-text email bodies with headers, tables, and inline styling
  • Subject customisation: insert variable values directly into the subject line

One version-specific issue trips up a lot of students. In v11 (the older enterprise platform), SMTP credentials were set once in Tools > Options > Email Settings and applied globally to every bot on the machine. In A2019 and Automation 360 (the current cloud-native versions), you configure email credentials inside the bot using the Email package. There is no global Tools > Options path for SMTP in A2019. If your tutorial is showing you that menu, it was written for v11.

Automation Anywhere certifications that IT companies in Hyderabad and other major GCC hubs test freshers on are now A2019/360-based, so the remainder of this guide covers only that version. For freshers targeting IT roles in Hyderabad, familiarity with A2019 is the expected baseline.

SMTP Configuration in 2026: Gmail, Outlook, and Yahoo

SMTP configuration is where most Send Email bots fail silently. There are two separate issues to get right: the server settings and the authentication method.

Server settings

The reference values for the four common providers:

ProviderSMTP HostPort (STARTTLS)Port (SSL)
Gmailsmtp.gmail.com587465
Outlook / Office 365smtp-mail.outlook.com587
Yahoo Mailsmtp.mail.yahoo.com587465
Hotmail / Livesmtp.live.com587

Port 587 with STARTTLS is the standard choice for enterprise deployments. Most corporate firewalls allow outbound 587. Port 465 is an older SSL-direct path that still works for Gmail but is less commonly available in enterprise network configs.

For detailed port behaviour and relay options per provider, Google’s official SMTP reference is the canonical source.

Authentication in 2026: App Passwords, not plain passwords

This is the change that breaks the most bots. Google discontinued “less secure app access” in May 2022. If your bot passes a Gmail password directly to the SMTP host, authentication will fail with a 535-5.7.8 error. The fix is an App Password.

Steps to generate an App Password for Gmail:

  • Step 1: Go to your Google account at myaccount.google.com
  • Step 2: Navigate to Security, then 2-Step Verification (you must have 2FA enabled)
  • Step 3: Scroll to App Passwords and click it
  • Step 4: Select “Other (Custom name)”, name it “Automation Anywhere”, generate
  • Step 5: Copy the 16-character password shown (no spaces, all lowercase)
  • Step 6: Use that 16-character string as the SMTP password in your bot’s Email connection

The full walkthrough is in Google’s App Passwords support article. Outlook and Yahoo have equivalent app-password flows in their security settings pages.

Building the Send Email Action: Step by Step

With SMTP sorted, the bot configuration is straightforward. In Automation Anywhere A2019/360:

  • Step 1: Open your bot in the Bot editor. From the left Actions panel, search “Email” and expand the Email package.
  • Step 2: Drag the Send action into your bot flow.
  • Step 3: In the action properties, click Add connection (or select an existing credential). Enter the SMTP host, port, and the 16-character App Password. Save the connection.
  • Step 4: Fill in From (the sender address), To (semicolon-separated recipients), and optionally CC and BCC.
  • Step 5: Add a Subject. You can insert variable values here, for example a date variable to produce “Daily report — 10 May 2026” automatically.
  • Step 6: In the Message field, choose the format: Plain Text or HTML. If composing rich text with tables or bold headers, select HTML. The default is plain text and does not warn you if you paste HTML in; it just sends the tags as visible characters.
  • Step 7: To attach files, click Attachments and add the file path. For dynamic paths, use a variable that holds the full absolute path your bot built earlier in the flow.
  • Step 8: Click Save. Run a test with a disposable inbox address before pointing the bot at real recipients.

Composing HTML email bodies

HTML emails in Automation Anywhere follow standard HTML markup. A minimal working structure:

<html>
  <body>
    <h2>Process Complete</h2>
    <p>Records processed: <strong>$RecordCount$</strong></p>
    <p>Report attached. Please review before end of day.</p>
  </body>
</html>

In A2019 and Automation 360, variable references inside the message body use the $variablename$ syntax, not curly braces.

Runtime Errors and How to Fix Them

Four errors account for the majority of failed first runs:

SMTP authentication failure (535-5.7.8) Root cause: Gmail password used directly, or App Password entered with spaces. Fix: Regenerate the App Password, copy without spaces, re-enter in the connection credential.

All recipients except the first do not receive the email Root cause: comma-separated addresses in the To field instead of semicolons. Fix: Replace all commas in the To field with semicolons. Check CC and BCC fields for the same issue.

HTML tags visible as plain text in the received email Root cause: Message format set to Plain Text while HTML markup is in the body. Fix: In the Send Email action properties, switch Message Format to HTML.

Attachment path error at runtime Root cause: Attachment path variable resolves to a relative path or a path that does not yet exist at the moment the Send Email action fires. Fix: Ensure the file-generation step runs and completes before the Send Email action in the bot flow. Use absolute paths. Add a File Exists check before the Send Email step and branch to an error handler if the file is missing.

Documenting these failure modes and the fixes is itself a portfolio asset. Technical writing about automation workflows (describing what a bot does, where it fails, and why) is a skill that devtool and edtech content internships specifically look for in engineering students.

From Rule-Based to LLM-Powered Email Automation

The Send Email command handles the delivery side of automation cleanly: fire on trigger, send to fixed list, attach a file. What it cannot do is decide what to write. Subject lines that adapt to the recipient, email bodies that summarise variable-length process outputs in plain language, or triage logic for incoming replies: a language model handles these, not an SMTP client.

That boundary between deterministic bots and adaptive text generation is exactly where LLMs are useful. TinkerLLM at ₹299 includes working examples of LLM-powered email drafting and classification that you can run, modify, and use as the content layer your Automation Anywhere bot calls before the Send Email step fires.

Primary sources

Frequently asked questions

What SMTP port should I use for Gmail in Automation Anywhere?

Use port 587 with STARTTLS or port 465 with SSL. Both work with Gmail App Passwords. Port 587 is generally preferred for A2019 and Automation 360 deployments because most enterprise firewalls pass STARTTLS outbound traffic without additional rule changes.

Why did my Send Email bot stop working after May 2022?

Google discontinued less-secure app access in May 2022. Any Send Email bot that used a Gmail password directly will fail after that date. Generate a 16-character App Password from your Google account security settings and use that value as the SMTP password in your bot or connection credential.

How do I send to multiple email addresses using the Send Email command?

Enter all addresses in the To field separated by semicolons (;), not commas. Example: [email protected];[email protected]. Commas may work in some deployments but semicolons are the documented delimiter in Automation Anywhere's email parser. The CC and BCC fields follow the same rule.

What is the difference between Send Email in v11 and A2019 or Automation 360?

In v11, SMTP credentials were configured globally in Tools > Options > Email Settings and applied to all bots on that machine. In A2019 and Automation 360, you use the Email package directly inside the bot, with SMTP credentials stored as a reusable Connection object or passed as variables. The change makes credential management more modular and supports per-bot email identities.

Can I attach files dynamically to emails using the Send Email command?

Yes. In the Send Email action, use a variable in the attachment path field instead of a hard-coded file name. The variable must hold a fully resolved absolute path at runtime — for example, a path your bot assembled from a base directory plus a timestamp-based file name. System variables like the current date string can be combined with string operations to build dynamic filenames.

Build AI projects

A self-paced playground for building with LLMs.

TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.

Try TinkerLLM (₹299 launch)
Free AI Roadmap PDF