
Send Email
Pricing
Pay per usage

Send Email
Send a custom email to one or more recipients. This Actor is useful for notifications and reporting. It can be invoked directly from code or via webhook integration after another Actor finishes.
4.7 (6)
Pricing
Pay per usage
100
Total users
2.9K
Monthly users
173
Runs succeeded
91%
Last modified
6 days ago
Apify Send Mail
Apify actor to send mail.
This actor is meant to be used as a reporting tool and must not be used to send promotional or spammy emails. Using it as such will lead to the user being banned on the Apify platform.
Input
Example:
{// Email address of the recipient(s) (e.g. "Bob <bob@example.com>")// Requiredto: String,// Email CC same format as to// Requiredcc: String// Email BCC same format as tobcc: String// Email subject// Requiredsubject: String,// Text body of Email// Requiredtext: String,// Email attachmentsattachments: [Object]}
Attributes:
to
- Email address of the recipient(s), you can comma-separate multiple addresses (e.g. "Bob bob@example.com" or "bob@example.com, hello@apify.com")cc
- Email CC same format as tobcc
- Email BCC same format as tosubject
- Email subjecttext
- Text body of Emailhtml
- HTML body of EmailreplyTo
- Email address which will be set when recipient will try to reply to mail. (Uses headerReply-To
see doc)attachments
- array of attachments in base64 string, example:
[{// attachment file namefilename: String,// attachment content in base64 stringdata: String}]
Limitations
To prevent abuse, the actor limits the number of email recipients:
- Users on the free plan can only send emails to their own email address associated with their Apify account.
- Paying users can send emails to up to 20 different recipients.
Usage
From other Apify actor
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 actor/task webhook
Calling this actor via a webhook is very handy because you can ensure it is sent only after specific event happens. Here is an example setup to send email after failed run.
- Open Webhooks tab of the actor/task that you want to monitor.
- Set Event types to
Run failed
andRun timed out
. - URL is the RUN API endpoint of this actor, just fill your API token - https://api.apify.com/v2/acts/apify~send-mail/runs?token=APIFY_API_TOKEN
- Payload template represents the body that is sent to this actor:
Example of payload that sends run ID in the email text:
{"to": "test@apify.com","subject": "Task Scrape-website run failed","text": {{eventData.actorRunId}}}
On this page
Share Actor: