• Home
  • Demo
  • Buy Now
RISE - Ultimate Project Manager & CRM
    RISE - Ultimate Project Manager & CRMInstallation & MaintenancePersonalizationSettingsClient ManagementAI AssistantInvoices & PaymentsProjects & TasksTeam & CollaborationProductivity ToolsSales & ServicesRISE ReportsPluginsFAQChange logs
Mailbox PluginLanding Page Builder PluginEasy Backup PluginSquare Payment Method PluginLogin as Client PluginAsset Management Plugin2 Factor Authentication PluginPassword Manager PluginSocial Login PluginGoogle Meet Integration PluginSpreadsheets PluginZoom Integration PluginAuto Attendance PluginWhiteboards PluginDocs PluginBlog Manager PluginWhatsApp Link PluginMicrosoft Teams Integration PluginProperty Management PluginTelegram Notification PluginAWS S3 Integration PluginWhatsApp Notification PluginWasabi Integration PluginBackblaze Integration PluginCloudflare R2 Integration PluginDigitalOcean Spaces Integration PluginAdyen Payment Method PluginbKash Payment Method Pluginiyzico Payment Method PluginJazzCash Payment Method PluginMercado Pago Payment Method PluginMidtrans Payment Method PluginMontonio Payment Method PluginN-Genius Payment Method PluginNagad Payment Method PluginPayFast Payment Method PluginPaysera Payment Method PluginPaystack Payment Method PluginPix Payment Method PluginRazorpay Payment Method PluginRocket Payment Method PluginSSLCommerz Payment Method Plugin
  1. Docs
  2. RISE - Ultimate Project Manager & CRM
  3. Plugins

Add an email protocol from a plugin

Your plugin can add a new way to send emails, like Amazon SES or another email service. The admin selects it in Settings > Email as the email protocol. It can also be selected for ticket emails in Settings > Tickets > Email settings.

Add the protocol to the list

app_hooks()->add_filter("app_filter_email_protocols", function ($protocols, $options) {
    $protocols["my_plugin_ses"] = "Amazon SES";
    return $protocols;
}, 10, 2);

$options["context"] is "default" on the Email settings page and "tickets" on the ticket email settings tab. Don't add your protocol to a context you don't support.

Show your fields

Print your fields on the settings page. Put them inside a div with data-email-protocols. RISE shows the div only when your protocol is selected.

app_hooks()->add_action("app_hook_email_settings_extension", function ($options) {
    $name = $options["setting_prefix"] . "my_plugin_ses_region";
    echo '
'; echo '
'; echo ''; echo '
<input type="text" id="' . $name . '" name="' . $name . '" value="' . esc(get_setting($name)) . '" class="form-control">
'; echo '
'; echo '
'; });
  • $options["setting_prefix"] is "" on the Email settings page and "ticket_" on the ticket tab. Add it to your field names, so the two pages keep their own values.
  • The "Email sent from name" and "Email sent from address" fields are shown for your protocol too.
  • Show "******" for saved secrets, and keep the saved value when this comes back.
  • If your protocol needs an authorization (like OAuth), add data-setting-prefix and data-authorize-url to your div. RISE opens that page after saving.
echo '
';

Save your fields

app_hooks()->add_action("app_hook_email_settings_save_data", function ($options) {
    $name = $options["setting_prefix"] . "my_plugin_ses_region";
    $Settings_model = model("App\Models\Settings_model");
    $Settings_model->save_setting($name, clean_data((string) service("request")->getPost($name)));
});

This runs before the test email is sent, so the admin can test your settings with the "Send test mail to" field.

Send the emails

RISE calls this filter for every email when your protocol is selected. Send the email and return true or false. Return $result as it is for other protocols.

app_hooks()->add_filter("app_filter_send_app_mail", function ($result, $data) {
    if ($data["protocol"] !== "my_plugin_ses") {
        return $result;
    }

    $settings = $data["email_settings"];
    $region = get_setting($settings["setting_prefix"] . "my_plugin_ses_region");

    //send $data["message"] to $data["to"] from $settings["from_address"] here
    return true;
}, 10, 2);
Key of $dataWhat it is
protocolThe selected protocol.
toOne email address or an array of addresses.
subjectThe subject.
messageThe HTML message.
optionsattachments (array of file_path and file_name), reply_to, cc, bcc, headers (array with In-Reply-To and References for ticket emails to clients; use get_email_thread_headers($options) to get the cleaned values and add them to your email, so it shows in the client's mail thread).
email_settingscontext ("default" or "tickets"), setting_prefix, from_name, from_address.
  • If no plugin sends the email, RISE writes an error in the log and the email is not sent.
  • Ticket emails use the ticket settings only when a protocol is selected on the ticket tab. Otherwise they use the main email settings.
Was this article helpful? Yes No
How can we improve this article?
© 2026 Fairsketch
Home Get Support Buy Now

Delete?

Are you sure? You won't be able to undo this action!
To do