Skip to content

$p.apiSendMail

Overview

This section explains the method for sending an email to a specified destination using an Ajax POST request.

Syntax

JavaScript
$p.apiSendMail({
    id: 123,
    data: {
        To: <The email address you want to set as To>,
        Cc: <The email address you want to set as CC>,
        Bcc: <The email address you want to set as Bcc>,
        Title: <Value to set in email subject>,
        Body: <Value to be set in the email body>
    }
})

Description Of Each Parameter

Parameter name Description
ID Site ID to operate on
To Destination to set in To
Cc Destination to set in Cc
Bcc Destination to set in Bcc
Title Value to set in the email title
Body Value to set in the email body

Usage Examples

JavaScript
$p.apiSendMail({
    id: 123,
    data: {
        To: 'to_user1@example.com',
        Cc: 'cc_user1@example.com',
        Bcc: 'bcc_user1@example.com',
        Title: 'Email sending verification',
        Body: 'This is the body of the email sending verification.'
    }
})