POST /mail/{id}/advsend

Sends An email through one of your mail orders allowing additional options such as file attachments, cc, bcc, etc.

Sends An email through one of your mail orders allowing additional options such as file attachments, cc, bcc, etc.

Path parameters

  • id integer Required

    Mail ID number

Body Required

  • subject string Required

    The subject or title of the email

  • body string Required

    The main email contents.

  • from object Required

    An email contact.

    Hide from attributes Show from attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • to array[object] Required

    A list of destionation email addresses to send this to

    An email contact.

    Hide to attributes Show to attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • replyto array[object]

    (optional) A list of email addresses that specify where replies to the email should be sent instead of the from address.

    An email contact.

    Hide replyto attributes Show replyto attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • cc array[object]

    (optional) A list of email addresses to carbon copy this message to. They are listed on the email and anyone getting the email can see this full list of Contacts who received the email as well.

    An email contact.

    Hide cc attributes Show cc attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • bcc array[object]

    (optional) list of email addresses that should receive copies of the email. They are hidden on the email and anyone gettitng the email would not see the other people getting the email in this list.

    An email contact.

    Hide bcc attributes Show bcc attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • attachments array[object]

    (optional) File attachments to include in the email. The file contents must be base64 encoded!

    (optional) File attachments to include in the email. The file contents must be base64

    Hide attachments attributes Show attachments attributes object
    • filename string Required

      The filename of the attached file.

    • data string Required

      The file contents base64 encoded

  • id integer(int64)

    (optional) ID of the Mail order within our system to use as the Mail Account.

Body Required

  • subject string Required

    The subject or title of the email

  • body string Required

    The main email contents.

  • from object Required

    An email contact.

    Hide from attributes Show from attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • to array[object] Required

    A list of destionation email addresses to send this to

    An email contact.

    Hide to attributes Show to attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • replyto array[object]

    (optional) A list of email addresses that specify where replies to the email should be sent instead of the from address.

    An email contact.

    Hide replyto attributes Show replyto attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • cc array[object]

    (optional) A list of email addresses to carbon copy this message to. They are listed on the email and anyone getting the email can see this full list of Contacts who received the email as well.

    An email contact.

    Hide cc attributes Show cc attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • bcc array[object]

    (optional) list of email addresses that should receive copies of the email. They are hidden on the email and anyone gettitng the email would not see the other people getting the email in this list.

    An email contact.

    Hide bcc attributes Show bcc attributes object
    • email string Required

      The email address.

    • name string

      Name to use for the sending contact.

  • attachments array[object]

    (optional) File attachments to include in the email. The file contents must be base64 encoded!

    (optional) File attachments to include in the email. The file contents must be base64

    Hide attachments attributes Show attachments attributes object
    • filename string Required

      The filename of the attached file.

    • data string Required

      The file contents base64 encoded

  • id integer(int64)

    (optional) ID of the Mail order within our system to use as the Mail Account.

Responses

  • 200 application/json

    search results matching criteria

    Hide response attributes Show response attributes object
    • status string Required
    • text string Required
  • 400 application/json

    The specified resource was not found

    Hide response attributes Show response attributes object
    • code string Required
    • message string Required
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • code string Required
    • message string Required
  • 404 application/json

    The specified resource was not found

    Hide response attributes Show response attributes object
    • code string Required
    • message string Required
POST /mail/{id}/advsend
curl \
 --request POST 'https://my.interserver.net/apiv2/mail/{id}/advsend' \
 --header "X-API-KEY: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"id":66,"to":[{"name":"Mr Client","email":"someone@client.com"}],"body":"Hello","from":{"email":"user@domain.com"},"subject":"Welcome","attachments":[{"data":"base64_encoded_contents","filename":"message.txt"}]}'
curl \
 --request POST 'https://my.interserver.net/apiv2/mail/{id}/advsend' \
 --header "X-API-KEY: $API_KEY" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'id=66&to=%7B%22name%22+%3D%3E+%22Mr+Client%22%2C+%22email%22+%3D%3E+%22someone%40client.com%22%7D&body=Hello&from=%7B%22email%22+%3D%3E+%22user%40domain.com%22%7D&subject=Welcome&attachments=%7B%22data%22+%3D%3E+%22base64_encoded_contents%22%2C+%22filename%22+%3D%3E+%22message.txt%22%7D'
Request example
{
  "id": 66,
  "to": [
    {
      "name": "Mr Client",
      "email": "someone@client.com"
    }
  ],
  "body": "Hello",
  "from": {
    "email": "user@domain.com"
  },
  "subject": "Welcome",
  "attachments": [
    {
      "data": "base64_encoded_contents",
      "filename": "message.txt"
    }
  ]
}
Request example
{"id" => 66, "to" => [{"name" => "Mr Client", "email" => "someone@client.com"}], "body" => "Hello", "from" => {"email" => "user@domain.com"}, "subject" => "Welcome", "attachments" => [{"data" => "base64_encoded_contents", "filename" => "message.txt"}]}
Response examples (200)
{
  "text": "The command completed successfully.",
  "status": "ok"
}
Response examples (400)
{
  "code": "string",
  "message": "string"
}
Response examples (401)
{
  "code": "string",
  "message": "string"
}
Response examples (404)
{
  "code": "string",
  "message": "string"
}