Sending Email from CM Admin 📧
Overview
The CM Admin email feature allows to send emails directly from the CM Admin. This documentation outlines how to use the CM Admin emails, including its configuration and examples.
Usage
To user CM Admin email use the CmAdmin.send_email
method.
Attributes
-
to
-
Specify to whom mail should be delivered. Takes array or single emails.
-
subject
-
subject of email. Takes only string
-
body
-
body of email. takes html string or normal string.
-
button_text
(optional) andbutton_link
(optional) -
If email template requires a link with button, use these attributes.
Examples
Here are some examples of how to use the CmAdmin.send_email
method to send emails:
CmAdmin.send_email(
"example@example.com",
"Test Email",
"<p>This is a test email from CM Admin.</p>"
)
-
With Link Button:
CmAdmin.send_email(
"example@example.com",
"Test Email",
"<p>This is a test email from CM Admin.</p>",
"This is link",
"https://google.com"
)