Sending Email from custom button

Topic summary

Goal: Trigger an automatic email when a custom button is clicked, including all associated data from a custom form, and send it to the store’s account email.

Context: The author can’t find where the platform’s default contact form handles email sending to replicate that logic for their custom form with additional fields.

Tools mentioned: Liquid and JavaScript used to build custom elements (Liquid = templating language; JS = client-side scripting).

Status: No concrete solution or implementation details provided yet. No code snippets or attachments. The question of how to hook a custom button/form into the platform’s email-sending flow remains unanswered.

Open points:

  • How to access or replicate the contact form’s email-sending mechanism.
  • How to include all custom form data in the outgoing email.
  • Whether this requires server-side handling or platform-specific APIs.
Summarized with AI on December 16. AI used: gpt-5.

Hi! Is there a way to automatically send an email when a custom button is clicked? I need all the data associated with that button to be sent in the email as well. I’m trying to relate this to the contact form, but I can’t locate its logic for sending the entered data. Since I created my own form, there’s more data I need to collect to send to the store account email.

Hi @Prodsquad2024 !
I only use liquid and JS to create custom elements.