This document explains how to configure GitHub Secrets for the wedding website's email functionality when deployed to GitHub Pages.
The wedding website uses Gmail (via Nodemailer) to send emails for:
- Contact form submissions
- RSVP confirmations
- Admin notifications
For security, email credentials are stored as GitHub Secrets rather than hardcoded in the repository.
Description: Your Gmail email address used for sending emails.
Example: wedding@example.com or your-email@gmail.com
How to get it: Use any Gmail account you have access to.
Description: Gmail App Password (NOT your regular Gmail password).
Important: This is NOT your regular Gmail password. You must generate a special "App Password" from Google.
How to get it:
-
Enable 2-Factor Authentication on your Google Account (required)
- Go to Google Account Security
- Enable 2-Step Verification if not already enabled
-
Generate App Password:
- Go to Google Account App Passwords
- Select app: "Mail" or "Other (Custom name)" → "Wedding Website"
- Click "Generate"
- Copy the 16-character password (remove spaces)
Example: abcd efgh ijkl mnop (use as: abcdefghijklmnop)
Description: Display name and email shown in sent emails.
Format: "Display Name <email@domain.com>"
Examples:
"Wedding <wedding@example.com>""Incia & Arvin <arvincia@sparrow-group.com>"- Just email:
"your-email@gmail.com"
Note: The email part should match your GMAIL_USER or be a verified sending address.
Description: Email address to receive test emails and notifications.
Example: admin@example.com or arvincia@sparrow-group.com
Purpose: Used for testing email functionality and receiving form submissions.
Description: API key for Web3Forms contact form service.
How to get it:
- Go to https://web3forms.com
- Sign up for free
- Create a new form
- Copy the Access Key
Note: This secret may already be configured in your repository.
-
Navigate to Repository Settings
- Go to your GitHub repository
- Click Settings tab
- In the left sidebar, click Secrets and variables → Actions
-
Add Each Secret
- Click New repository secret button
- Enter the secret name (exactly as shown above, case-sensitive):
GMAIL_USERGMAIL_APP_PASSWORDGMAIL_FROMTEST_EMAIL_TOWEB3FORMS_ACCESS_KEY
- Paste the corresponding value
- Click Add secret
-
Verify Secrets
- You should see all 5 secrets listed
- Secret values are encrypted and hidden (you can't view them after creation)
- You can update or delete secrets if needed
Repository Settings → Secrets and variables → Actions → New repository secret
After adding all secrets, you should see:
✓ GMAIL_USER
✓ GMAIL_APP_PASSWORD
✓ GMAIL_FROM
✓ TEST_EMAIL_TO
✓ WEB3FORMS_ACCESS_KEY
- Use Gmail App Passwords (not regular passwords)
- Keep secrets confidential
- Use dedicated email accounts for production
- Rotate App Passwords periodically
- Use 2-Factor Authentication on Gmail
- Share secrets publicly
- Commit secrets to version control
- Use personal Gmail passwords
- Reuse passwords across services
- Disable 2-Factor Authentication
After configuring secrets:
-
Trigger a Deployment
git push origin main
-
Check Workflow Run
- Go to Actions tab
- Watch the "Deploy Next.js site to Pages" workflow
- Verify it completes successfully
-
Test Email Sending
- Visit your deployed site
- Submit a contact form
- Check TEST_EMAIL_TO address for notifications
Solution: Verify all secrets are added with exact names (case-sensitive).
Possible causes:
- Incorrect GMAIL_APP_PASSWORD (must be App Password, not regular password)
- 2-Factor Authentication not enabled on Gmail
- GMAIL_USER doesn't match the account that generated the App Password
- Secrets not configured correctly
Solution:
- Regenerate Gmail App Password
- Double-check secret values (delete and re-add if needed)
Solution: You're using regular password instead of App Password. Generate an App Password.
Solution: Add WEB3FORMS_ACCESS_KEY secret.
- QUICK_DEPLOY_GITHUB_PAGES.md - Quick deployment guide
- GITHUB_PAGES_DEPLOYMENT.md - Detailed deployment information
- .github/workflows/nextjs.yml - Workflow file using these secrets
For issues or questions:
- Email: codestromhub@gmail.com
- Phone: +880 1234-567890
- Location: Dhaka, Bangladesh
Last Updated: October 12, 2025 Version: 1.0