---
title: SMTP Send
slug: smtp-send
docTags: 
createdAt: 2022-11-29T15:23:25.000Z
---

Sends a mail in html format using the specified server credentials.&#x20;

- Exclude the password parameter for sending mails without authentication
- To send to multiple people, provide a comma seperated list of emails



| Options             | Description                                                                                 |
| ------------------- | ------------------------------------------------------------------------------------------- |
| from                | Format sender info. To do this ass it in the format<br />"Sender" \<sender\@email.com>      |
| to,cc               | Add comma separated email id's to send to multiple people                                   |
| attachments.type    | text/binary                                                                                 |
| attachemtns.content | Regular text if type is text, or **base64encoded binary content** if the type is **binary** |



### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/web/smtpsend",
  "name": "SMTP Send API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": \"Sending Async...\",\n    \"size_in_bytes\": 209.0\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\r\n    \"input\":{\r\n        \"settings\":{\r\n            \"from\":\"sender@domain.com\",\r\n            \"to\":\"receipient@mail.com\",\r\n            \"cc\":\"ccto@email.com\",\r\n            \"host\":\"smtp.servername.com\",\r\n            \"ssl\":\"yes\",\r\n            \"port\":\"467\",\r\n\t\t\t\"user_name\":\"username\",\r\n\t\t\t\"password\":\"password\",\r\n            \"subject\":\"Hello\",\r\n            \"body\":\"From Pathfix\"\r\n        }\r\n    }\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::





:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/web/smtpsend",
  "name": "SMTP Send API with User Name",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": \"Sending Async...\",\n    \"size_in_bytes\": 209.0\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\r\n    \"input\":{\r\n        \"settings\":{\r\n            \"from\":\"\\\"Sender\\\" <sender@domain.com>\",\r\n            \"to\":\"receipient@mail.com,receipient1@mail.com\",\r\n            \"host\":\"smtp.servername.com\",\r\n            \"ssl\":\"yes\",\r\n            \"port\":\"467\",\r\n\t\t\t\"user_name\":\"username\",\r\n\t\t\t\"password\":\"password\",\r\n            \"subject\":\"Hello\",\r\n            \"body\":\"From Pathfix\"\r\n        }\r\n    }\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/web/smtpsend",
  "name": "SMTP Send API with Attachments",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": \"Sending Async...\",\n    \"size_in_bytes\": 209.0\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\r\n    \"input\":{\r\n        \"settings\":{\r\n            \"from\":\"\\\"Sender\\\" <sender@domain.com>\",\r\n            \"to\":\"receipient@mail.com,receipient1@mail.com\",\r\n            \"host\":\"smtp.servername.com\",\r\n            \"ssl\":\"yes\",\r\n            \"port\":\"467\",\r\n\t\t\t\"user_name\":\"username\",\r\n\t\t\t\"password\":\"password\",\r\n            \"subject\":\"Hello\",\r\n            \"body\":\"From Pathfix\",\r\n            \"attachements\":[\r\n                {\r\n                    \"name\":\"filename.txt\",\r\n                    \"content\":\"Text content in file\",\r\n                    \"type\":\"text\"\r\n                }\r\n            ]\r\n        }\r\n    }\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




