← Back to Stock Monitor

📧 EmailJS Setup Guide

Step-by-step instructions to enable email notifications

Step 1: Create EmailJS Account

  1. Go to emailjs.com
  2. Click "Sign Up" in the top right corner
  3. Choose to sign up with Google, GitHub, or create an account with email
  4. Complete the registration process
  5. Verify your email address if required
Free Tier: EmailJS offers 200 free emails per month, which is perfect for stock monitoring!

Step 2: Add Email Service

  1. Once logged in, go to the Email Services tab
  2. Click "Add New Service"
  3. Choose your email provider (Gmail, Outlook, Yahoo, etc.)
  4. Follow the setup instructions for your chosen provider:
    • Gmail: You'll need to enable 2-factor authentication and create an app-specific password
    • Outlook: Use your regular email and password
    • Other providers: Follow the specific instructions provided
  5. Test the service to make sure it's working
  6. Copy the Service ID (e.g., "service_abc123") - you'll need this later
Save this: Service ID: service_xxxxxxxx

Step 3: Create Email Template

  1. Go to the Email Templates tab
  2. Click "Create New Template"
  3. Choose a template name (e.g., "Stock Alert")
  4. Set up the template with the following content:

Subject Line:

{{subject}}

Email Body:

Hello! {{message}} Product Details: • Name: {{product_name}} • Link: {{product_url}} • Alert Time: {{timestamp}} This alert was sent by your Stock Monitor app. -- Sent by {{from_name}}

Available Template Variables:

  • {{to_email}} - Recipient email address
  • {{to_name}} - Recipient name
  • {{from_name}} - Sender name (Stock Monitor)
  • {{subject}} - Email subject
  • {{message}} - Main email message
  • {{product_name}} - Product name
  • {{product_url}} - Product URL
  • {{timestamp}} - When alert was sent
  1. Click "Save"
  2. Test the template by clicking "Test It"
  3. Copy the Template ID (e.g., "template_xyz789")
Save this: Template ID: template_xxxxxxxx

Step 4: Get Your Public Key

  1. Go to the Account tab (or Integration tab)
  2. Find the "Public Key" section
  3. Copy your public key (it looks like a random string of letters and numbers)
Save this: Public Key: xxxxxxxxxxxxxxxx

Step 5: Configure Stock Monitor

  1. Go back to your Stock Monitor app
  2. Check the "Enable email notifications" checkbox
  3. Click "Email Options" to expand the section
  4. Fill in all the fields:
    • Your email address: Where you want to receive alerts
    • EmailJS Service ID: From Step 2
    • EmailJS Template ID: From Step 3
    • EmailJS Public Key: From Step 4
  5. Click "Test Email" to verify everything works
  6. Start monitoring and you'll receive email alerts when products come back in stock!

Troubleshooting

Common Issues:

  • "Recipients address is empty": Make sure your template uses {{to_email}} for the recipient
  • "Service not found": Double-check your Service ID
  • "Template not found": Double-check your Template ID
  • "Authentication failed": Verify your Public Key
  • Gmail issues: Make sure you're using an app-specific password, not your regular password
Still having issues? Check the browser console (F12) for detailed error messages.
← Return to Stock Monitor