> ## Documentation Index
> Fetch the complete documentation index at: https://developers.nlpearl.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send An Email

> Learn how to configure the "Send An Email" action within a Pearl, allowing your AI agent to send emails during a conversation.

<div className="block dark:hidden">
  <Frame>
    <div className="p-1">
      <img src="https://mintcdn.com/nlpearl/5m7CLiudjrqxiyho/images/light_mode/action_send_email.jpg?fit=max&auto=format&n=5m7CLiudjrqxiyho&q=85&s=a3cf0d091239516eed1611f34832ef96" alt="Send Email action interface on light mode" className="rounded-[14px]" width="3822" height="2300" data-path="images/light_mode/action_send_email.jpg" />
    </div>
  </Frame>
</div>

<div className="hidden dark:block">
  <Frame>
    <div className="p-1">
      <img src="https://mintcdn.com/nlpearl/ek92yQlpTyrjmvSe/images/dark_mode/action_send_email.jpg?fit=max&auto=format&n=ek92yQlpTyrjmvSe&q=85&s=5714bf77c1f8861d78776bc918cf7c30" alt="Send Email action interface on dark mode" className="rounded-[14px]" width="3822" height="2300" data-path="images/dark_mode/action_send_email.jpg" />
    </div>
  </Frame>
</div>

One of the powerful actions that your AI agent can handle in real-time is "Sending an Email." This allows your agent to automatically send an email based on specific conditions during a conversation.

***

### Configuring the "Send An Email" Action

During the creation of a Pearl, you can easily activate and configure the "Send An Email" action in the Actions section. Here's how to set it up:

<Steps>
  <Step title="Activate the Action">
    Click on "Send Email" in the Actions section to enable this functionality for your Pearl.
  </Step>

  <Step title="Configure Email Details">
    Once activated, you'll need to fill out a few key fields to customize the email that will be sent.
  </Step>
</Steps>

***

### Fields to Configure

<Steps>
  <Step title="Subject">
    Just like in a regular email, you can set the subject line here. You can also use created variables within this field to personalize the subject for each recipient. For example, you might use the prospect's first name in the subject line.
  </Step>

  <Step title="Email Content">
    This is the body of your email. Write any message you want to be sent out, and again, you can use variables to customize the content. For example, include specific details gathered during the conversation, such as a price quote or meeting time.
  </Step>

  <Step title="When to Trigger">
    This field is crucial. Here, you describe the conditions under which you want the agent to send the email. For example, `"Send an email when the customer agrees to receive more information"` or `"Send a confirmation email when the prospect is ready to finalize the deal."` Your agent will automatically send the email when these conditions are met during the discussion.
  </Step>
</Steps>

***

## How to Connect Your Email to Pearl

Pearl can send emails **from your own business address** via one of three connection methods: **Gmail**, **Office 365**, or **Custom SMTP**.

***

<div
  style={{
display: 'flex',
alignItems: 'center',
gap: '8px',        /* espace entre logo et texte */
justifyContent: 'flex-start', /* tout à gauche */
width: '100%',
height: '22px'
}}
>
  <img src="https://mintcdn.com/nlpearl/yjNN1PpSs3yxoZOQ/logo/gmail_icon.webp?fit=max&auto=format&n=yjNN1PpSs3yxoZOQ&q=85&s=bbf0f36ad5969429117b5cc74af1a273" alt="Gmail icon" style={{ width: '36px', height: '36px', border:'1px solid #212121', padding: '8px', borderRadius: '4px', objectFit: 'contain' }} width="2560" height="1920" data-path="logo/gmail_icon.webp" />

  <h3 style={{ margin: 0 }}>Connect Gmail Account</h3>
</div>

1. Select **Gmail** from the provider list.
2. Enter your **Sender Email** (your Gmail address).
3. Enter a **Gmail app‑password** (not your normal password – [learn how to generate one](https://support.google.com/accounts/answer/185833)).
4. *(Optional)* Add an address under **Test Email to**.
5. Click **Test Config** – if it succeeds, click **Save**.

<Warning>Enable **2‑factor authentication** on your Google account and use an **app‑password** – not your main password.</Warning>

***

<div
  style={{
display: 'flex',
alignItems: 'center',
gap: '8px',        /* espace entre logo et texte */
justifyContent: 'flex-start', /* tout à gauche */
width: '100%',
height: '22px'
}}
>
  <img src="https://mintcdn.com/nlpearl/yjNN1PpSs3yxoZOQ/logo/Logo_Outlook%20365.png?fit=max&auto=format&n=yjNN1PpSs3yxoZOQ&q=85&s=1294a36a5eea4c0fcf1c7398a41e8ea5" alt="Gmail icon" style={{width: '36px', height: '36px', border:'1px solid #212121', padding: '8px', borderRadius: '4px', objectFit: 'contain'}} width="405" height="487" data-path="logo/Logo_Outlook 365.png" />

  <h3 style={{ margin: 0 }}>Connect Office 365 Account </h3>
</div>

1. Select **Office 365** from the provider list.
2. Enter your **Sender Email** (Microsoft address).
3. Enter an **Office 365 app‑password** (see your Microsoft security settings).
4. *(Optional)* Add a **Test Email** address.
5. Click **Test Config**; then **Save**.

<Warning>Office 365 may block basic SMTP by default – be sure your tenant allows it and use an app‑password where required.</Warning>

***

<div
  style={{
display: 'flex',
alignItems: 'center',
gap: '8px',        /* espace entre logo et texte */
justifyContent: 'flex-start', /* tout à gauche */
width: '100%',
height: '22px'
}}
>
  <img src="https://mintcdn.com/nlpearl/yjNN1PpSs3yxoZOQ/logo/email_icon.png?fit=max&auto=format&n=yjNN1PpSs3yxoZOQ&q=85&s=8e55aa5c8a76bba48cd2be38dcc205ac" alt="Gmail icon" style={{ width: '36px', height: '36px', border:'1px solid #212121', padding: '8px', borderRadius: '4px', objectFit: 'contain' }} width="512" height="512" data-path="logo/email_icon.png" />

  <h3 style={{ margin: 0 }}>Connect via Custom SMTP </h3>
</div>

1. Select **Custom** from the provider dropdown.
2. Enter your **SMTP Server** (e.g., `smtp.gmail.com`, `smtp.office365.com`, `mail.yourdomain.com`).
3. Enter the **Port**:
   * Usually **587** for TLS
   * Or **465** for SSL
4. Toggle **Enable SSL** on or off depending on your provider (usually **On**).
5. Enter your **Sender Email** (the email address you will use to send messages).
6. Enter your **SMTP account password**.
7. (Optional) Add a **Test Email** address under **Test Email to**.
8. Click **Test Config** to validate.
9. Once the configuration is confirmed, click **Save**.

<Info>If you're unsure about your SMTP details, please check with your email hosting provider (e.g., Google Workspace, Outlook, Zoho, etc.).</Info>

***

<CardGroup cols={1}>
  <Card title="Variables" icon="square-root-variable" iconType="light" href="/pages/variables">
    Learn how to use variables to expand the functionality of Pearl.
  </Card>
</CardGroup>
