Files
web-pottery/emailjs-config-example.js
2025-09-27 01:46:37 +01:00

68 lines
1.6 KiB
JavaScript

/**
* EmailJS Configuration Example
*
* Follow these steps to enable real email sending:
*
* 1. Create account at https://www.emailjs.com/
* 2. Connect your email service (Gmail, Outlook, etc.)
* 3. Create email templates (see EMAILJS_SETUP.md)
* 4. Get your keys from EmailJS dashboard
* 5. Replace the values below with your actual keys
* 6. Update the template IDs in the functions below
*/
// Step 1: Replace these with your actual EmailJS values
const EMAILJS_CONFIG = {
PUBLIC_KEY: 'YOUR_EMAILJS_PUBLIC_KEY', // From EmailJS Account > General
SERVICE_ID: 'YOUR_SERVICE_ID', // From EmailJS Email Services
TEMPLATE_ID: 'YOUR_ORDER_TEMPLATE_ID' // From EmailJS Email Templates
};
// Step 2: Update template IDs in these functions (in script.js):
/*
In handleContactFormSubmission function, update:
const contactTemplateId = 'YOUR_CONTACT_TEMPLATE_ID';
In handleNewsletterSubmission function, update:
const newsletterTemplateId = 'YOUR_NEWSLETTER_TEMPLATE_ID';
*/
// Step 3: Test email templates with these variable names:
/*
ORDER TEMPLATE VARIABLES:
- order_id
- order_date
- order_total
- customer_name
- customer_email
- customer_phone
- preferred_contact
- shipping_address
- billing_address
- payment_preference
- order_notes
- items_table (HTML)
- items_list (text)
CONTACT TEMPLATE VARIABLES:
- from_name
- from_email
- message
- contact_date
NEWSLETTER TEMPLATE VARIABLES:
- subscriber_email
- subscribe_date
*/
// Example working configuration (replace with your values):
/*
const EMAILJS_CONFIG = {
PUBLIC_KEY: 'abcd1234efgh5678',
SERVICE_ID: 'service_xyz123',
TEMPLATE_ID: 'template_pottery_order'
};
*/