> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.microsoft.mail.SendEmail

- Component: `appmixer.microsoft.mail.SendEmail`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.microsoft.mail 2.3.0](https://connectors.appmixer.com/connector/appmixer.microsoft.mail/2.3.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.microsoft.mail/2.3.0/component/appmixer.microsoft.mail.SendEmail>

Send a new email.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| To (`toRecipients`) | text | The email address (or comma separated addresses) of the message's recipient(s). |
| Subject (`subject`) | text | The subject of the message. |
| Content (`content`) | textarea | Text or HTML body of the message. See 'Content type' select. |
| Content type (`contentType`) | select | Select the type of content. |
| Attachments (`attachments`) | expression | Attachments for the email message. |

## Output ports

### Port `email`

| Field | Type | Description |
| --- | --- | --- |
| `result` | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.microsoft.mail.SendEmail",
  "author": "Tomáš Waldauf <tomas@client.io>",
  "description": "Send a new email.",
  "auth": {
    "service": "appmixer:microsoft",
    "scope": [
      "Mail.Send",
      "Mail.ReadWrite"
    ]
  },
  "inPorts": [
    {
      "name": "in",
      "inspector": {
        "inputs": {
          "toRecipients": {
            "type": "text",
            "index": 1,
            "label": "To",
            "tooltip": "The email address (or comma separated addresses) of the message's recipient(s)."
          },
          "subject": {
            "type": "text",
            "index": 2,
            "label": "Subject",
            "tooltip": "The subject of the message."
          },
          "content": {
            "type": "textarea",
            "index": 3,
            "label": "Content",
            "tooltip": "Text or HTML body of the message. See 'Content type' select."
          },
          "contentType": {
            "type": "select",
            "index": 4,
            "label": "Content type",
            "tooltip": "Select the type of content.",
            "defaultValue": "Text",
            "options": [
              {
                "content": "Text",
                "value": "Text"
              },
              {
                "content": "HTML",
                "value": "HTML"
              }
            ]
          },
          "attachments": {
            "type": "expression",
            "label": "Attachments",
            "tooltip": "Attachments for the email message.",
            "index": 5,
            "levels": [
              "ADD"
            ],
            "fields": {
              "fileId": {
                "type": "filepicker",
                "label": "File",
                "tooltip": "The file to attach.",
                "index": 1
              }
            }
          }
        }
      },
      "schema": {
        "type": "object",
        "properties": {
          "toRecipients": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "contentType": {
            "enum": [
              "Text",
              "HTML"
            ]
          },
          "attachments": {}
        },
        "required": [
          "toRecipients",
          "content"
        ]
      }
    }
  ],
  "outPorts": [
    {
      "name": "email",
      "options": [
        {
          "label": "result",
          "value": "result",
          "schema": {
            "type": "string",
            "example": "ok"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
