Actor

apify/send-mail

  • Builds
  • latest 0.1.25 / 2018-08-01
  • beta 0.1.5 / 2017-10-09
  • Created 2017-09-04
  • Last modified 2018-02-05
  • grade 67

Description

Act sends mail.


API

To run the actor, send a HTTP POST request to:

https://api.apify.com/v2/acts/apify~send-mail/runs?token=<YOUR_API_TOKEN>

The POST payload will be passed as input for the actor. For more information, read the docs.


Example input

Content type: application/json

{
  "to": "test@example.com",
  "subject": "Test",
  "text": "text"
}

Readme

act-send-mail

Apify act to send mail.

Input

Example:

{
    // Email address of the recipient(s) (e.g. "Apify <info@apify.com>")
    // Required
    to: String,
    // Email CC same format as to
    // Required
    cc: String
    // Email BCC same format as to
    bcc: String
    // Email subject
    // Required
    subject: String,
    // Text body of Email
    // Required
    text: String,
    // Email attachments
    attachments: [Object]
}

Attributes:

  • to - Email address of the recipient(s) (e.g. "Apify info@apify.com")
  • cc - Email CC same format as to
  • bcc - Email BCC same format as to
  • subject - Email subject
  • text - Text body of Email
  • html - HTML body of Email
  • replyTo - Email address which will be set when recipient will try to reply to mail. (Uses header Reply-To see doc)
  • attachments - array of attachments in base64 string, example:
    [{
      // attachment file name
      filename: String,
      // attachment content in base64 string
      data: String
    }]

Usage

From other Apify act

await Apify.call('apify/send-mail', {
    to: 'test@apify.com',
    subject: 'Test from act',
    text: "Email text",
    attachments: [{
        filename: 'test.txt',
        data: 'dGVzdCBzZmFzZGFzZGFzZGFzZA'
    }]
});

From Apify Crawler finish webhook

For a specific crawler set the following parameters:

Finish webhook URL (finishWebhookUrl)

https://api.apify.com/v2/acts/apify~send-mail/runs?token=APIFY_API_TOKEN You can find your API token on your Apify account page.

Finish webhook data (finishWebhookData)
{
    "to": "test@apify.com",
    "subject": "Test from crawler",
    "text": "Text",
    "html": "<p>Text</p>"
}