All of Re:Maily’s PHP hooks start with remaily_. Filters return a value; actions only run.
Showing a form
Hook
Kind
Use
remaily_init
action
Re:Maily has started
remaily_render_args
filter
A form’s class and html_id, wherever it shows
remaily_field
filter
A field’s settings just before it’s printed
remaily_field_control
filter
A field’s control HTML
remaily_form_attributes
filter
Attributes of the <form> element
remaily_form_html
filter
The form’s inner HTML
remaily_hidden_inputs
filter
Hidden inputs sent with the form
remaily_token_{name}
filter
What a reserved token prints, such as [[captcha]]
remaily_script_config
filter
What the front-end script reads for a form
remaily_enqueue
action
A form’s assets are loading
remaily_template, remaily_template_vars
filter
Which template file loads, and the variables it gets
remaily_icon
filter
The SVG of an icon
remaily_form_closed
filter
Close a form: return a message, such as “Registration has ended”, and it shows instead of the form and answers anyone who sends it. Return ” to keep it open. Use it for dates, an entry limit or a schedule.
remaily_form_rendered
action
A form was printed, the editor’s Preview included: count views
Move a field type’s button to the main row or the More menu
remaily_countries
filter
The countries of the Country field and the Tel masks: code => [ name, dial, mask, trunk ], with # for each digit of the mask
remaily_tel_masks
filter
One Tel field’s masks, the first one tried first: ( $masks, $field ), each code => [ mask, trunk ]
remaily_places
filter
Add a chip with nothing to set up, like Captcha and Response
remaily_default_sources, remaily_default_value
filter
The choices under Fill from, and the starting value a field gets from them
remaily_docs_url, remaily_support_url
filter
Where the Documentation and support links in the admin go
remaily_import_forms
action
Import forms from a file, a URL or JSON, such as in a theme’s demo import. The second argument replaces forms with the same shortcode.
remaily_file_types
filter
The types File fields may take, as extension => kind. Images, audio, video, PDF and txt by default. Add or remove types; each must also be one WordPress allows. Example: fn( $types ) => $types + [ ‘docx’ => ‘Word document’ ]
remaily_field_info
filter
What [[name:key]] can show of a field: key => [ label, value ]. Add keys of your own; they appear under Use in text in the editor.
Sending a message
Hook
Kind
Use
remaily_spam, remaily_skip_spam_check
filter
Mark a message as spam, or skip the checks
remaily_spam_checks
filter
Turn spam checks off for a form
remaily_skip_captcha
filter
Skip the captchas for a message, as a paid message does
remaily_akismet_params
filter
What is sent to Akismet
remaily_remote_ip
filter
The visitor’s IP address, behind a proxy Re:Maily doesn’t recognize
remaily_spam_caught
action
A check caught a message
remaily_posted_data
filter
The posted values, after cleaning
remaily_validate_{type}, remaily_validate
filter
Field errors
remaily_before_send_mail
action
Before the mails go
remaily_payment
filter
The amount, currency or description a Stripe or PayPal field asks for
remaily_payment_gateways
filter
Add a payment provider
remaily_skip_mail
filter
Send no mail for this message
remaily_mail
filter
A mail’s to, from, subject, body, headers and attachments
remaily_mail_tag
filter
What a mail tag prints
remaily_special_mail_tags
filter
Your own special tags, so the Mail tab knows them
remaily_mail_sent, remaily_mail_failed
action
After the mail went, or failed
remaily_entry_data, remaily_entry_saved
filter, action
The entry before and after it’s saved
remaily_webhook_payload
filter
The JSON sent to webhooks
remaily_keep_uploads
filter
Keep uploaded files after mailing
remaily_submitted
action
The message is done
remaily_response
filter
The reply sent back to the browser
remaily_messages, remaily_message
filter
All messages, or one message’s text
remaily_brevo_contact
filter
The contact sent to Brevo: email, listIds, attributes. An empty array sends nothing.
The entry screen
Hook
Kind
Use
remaily_entry_actions
action
Buttons beside All entries and Move to trash, such as Reply. Gets the entry ID.
remaily_entry_view
action
More of the entry under its details, such as notes or a status. Gets the entry ID, its values and the visit.
The entries list is WordPress’s own list of the remaily_entry post type, so its columns, bulk actions and statuses use WordPress’s hooks, such as manage_remaily_entry_posts_columns.
Add-ons
An add-on is a plugin of its own (Requires Plugins: remaily) that talks to Re:Maily through these hooks. Re:Maily has no licenses or paid features of its own: an add-on that needs a license keeps it, checks it and shows it itself.
Hook
What it does
remaily_addons
Lists your add-on: name, version, docs, settings (the Settings tab its options are in), premium (only the word on its card), ready (false: don’t start it yet), readonly (a note: its options and form tab can’t be changed), status ([ label, tone ] on its card) and panel (a callable printing its own part of its window, such as a license form). An add-on that isn’t in the catalog also passes description, category, tags, icon and color.
remaily_addon_init_{slug}
Runs while your add-on is on and ready: hook the rest here.
remaily_addons_catalog
The cards of the Add-ons page, shown before an add-on is installed too. Change an entry, such as its description.
remaily_addon_notice
do_action( 'remaily_addon_notice', $slug, $type, $text ) after your own form posts: the add-on’s window opens with that note (success, warning or danger).
remaily_settings_sections
Your options in Settings: a node marked 'addon' => slug.
remaily_form_tabs
A tab of your own in the form editor, drawn from a controls tree.
remaily_logos
Your logo by name, [ 'my-crm' => MY_PATH . 'assets/my-crm.svg' ], then draw it with remaily_logo( 'my-crm' ).
remaily_formula_function
Calculator add-on: a function of your own in formulas. Gets ( null, $name, $args, $context ), $context['form'] being the form; return a number or text for your name, null for others. Its twin in the browser is window.remailyFormulaFunctions.name = ( args, { number } ) => …. The Coupons add-on adds discount() this way.