EmailJS is a service that sends email directly from the browser using your Gmail account. No backend server required. Files are attached individually with their category label (e.g. "STL Upper — Patient: John Smith"). Free plan allows 200 emails/month; paid plans start at $15/month.
- Create a free account at
emailjs.comand connect your Gmail under Email Services → Add Service → Gmail. - Create an Email Template. In the template body use variables like
{{patient_name}},{{doctor}}, and{{file_list}}. Set To Email to your clinic's Gmail address. - Copy your Service ID, Template ID, and Public Key from the EmailJS dashboard.
- Add the EmailJS SDK to this HTML file just before the closing
</body>tag:
<script src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js"></script> - Replace the
submitCase()function in this file with the EmailJS send call. Example:// Initialize once (put in <head>)
emailjs.init('YOUR_PUBLIC_KEY');
// Inside submitCase():
const params = {
patient_name: document.getElementById('patName').value,
patient_id: document.getElementById('patId').value,
doctor: document.getElementById('drName').value,
file_list: getUploadedList()
};
emailjs.send('SERVICE_ID', 'TEMPLATE_ID', params)
.then(() => showToast())
.catch(err => alert('Error: ' + err.text));
When files are large (STL files can be 10–50 MB), email attachments won't work reliably. This approach uploads the files to a shared Google Drive folder and sends you an email with the organized folder link. Uses Make.com (formerly Integromat) as the automation bridge — no coding required after setup.
- Your developer adds a backend endpoint (Node.js, PHP, or Python — even a serverless function on Vercel/Netlify) that receives the form data via
fetch()POST. - That endpoint uses the Google Drive API to create a folder named
Patient — John Smith — 2025-06-12and uploads each file into it with its category as the filename prefix. - After upload, the endpoint triggers the Gmail API (or Make.com webhook) to send you an email: "New case submitted by Dr. [Name] — Patient: [Name] — View files: [Drive link]"
- On Make.com: create a scenario with trigger Webhook → Google Drive: Upload File → Gmail: Send Email. No code needed on Make.com side.
- In the form's
submitCase(), replace the placeholder with afetch('YOUR_WEBHOOK_URL', formData)POST call usingFormDatato include all the files.
Formspree is the simplest drop-in: point the form action to your Formspree endpoint, and file uploads go straight to your Gmail as attachments. Good for testing or low-volume use. File size limit is 10 MB per submission on the free plan.
- Sign up at
formspree.ioand create a new form. Copy the form endpoint URL (looks likehttps://formspree.io/f/xyzabcde). - Change the form's submit handler to POST to that URL using the standard
FormDataAPI. - In the Formspree dashboard, set the notification email to your Gmail. Every submission will arrive there with all uploaded files attached.
- Formspree labels each field by the input's
nameattribute — make sure each<input>in this file has a descriptivename(e.g.name="stl_upper"). Your designer only needs to add those name attributes.
name="..." attributes to each file input,
(2) choose one of the three options above,
(3) replace the submitCase() placeholder function with the chosen email-send call, and
(4) add your clinic's Gmail address as the destination.
Estimated developer time: 1–3 hours depending on the option chosen.