Overview
DevAurva uses Nodemailer to send email notifications for contact form submissions, custom plan requests, and card plan selections. The application is configured to work with Gmail’s SMTP service.Email Dependencies
The application uses nodemailer (v6.10.0) for email functionality.Nodemailer Configuration
The email transporter is configured inserver.js:27-34:
Gmail Setup for Nodemailer
App passwords are only available when 2-Step Verification is enabled. You cannot use your regular Gmail password with Nodemailer.
EMAIL_USER=[email protected]
EMAIL_PASS=your-16-char-app-password
EMAIL_RECIPIENT=[email protected]
Email Notification Types
DevAurva sends three types of email notifications:Contact Form Emails
Sent when users submit the contact form (server.js:37-74):
- Sender’s name and email
- Message content
- Both plain text and HTML formats
Custom Plan Request Emails
Sent when users submit custom plan requests with selected features (server.js:98-124):
Includes:
- Client contact information
- Company name and website type
- Selected features with pricing
- Total price calculation
- Additional notes
Card Plan Request Emails
Sent when users select predefined pricing plans (server.js:155-169):
Includes:
- Client contact information
- Selected plan type (Starter/Professional/Enterprise)
- Website type
- Plan price and budget information
Email Recipient Configuration
The recipient email uses a fallback pattern (server.js:44,100):
- If
EMAIL_RECIPIENTis set, notifications go to that address - If not set, notifications are sent to
EMAIL_USER(yourself)
Testing Email Setup
EMAIL_USER=[email protected]
EMAIL_PASS=xxxx xxxx xxxx xxxx
EMAIL_RECIPIENT=[email protected]
Troubleshooting
Authentication Failed
If you see authentication errors:- Verify 2-Step Verification is enabled on your Google account
- Ensure you’re using an app password, not your regular Gmail password
- Check that
EMAIL_USERmatches the Gmail account that generated the app password - Remove any spaces from the app password
Emails Not Sending
If emails aren’t being sent:- Check the server console for error messages
- Verify your Gmail account isn’t blocked or suspended
- Ensure you haven’t exceeded Gmail’s sending limits (500 emails/day for free accounts)
- Check spam/junk folders in the recipient’s inbox
Invalid Credentials Error
- Regenerate your app password
- Ensure 2FA is enabled
- Verify the email address is correct
Connection Timeout
If emails timeout:- Check your network connectivity
- Verify firewall isn’t blocking SMTP connections
- Ensure port 587 or 465 is accessible
Gmail Sending Limits
Be aware of Gmail’s sending limits:- Free Gmail accounts: 500 emails per day
- Google Workspace: 2,000 emails per day
- SendGrid
- AWS SES
- Mailgun
- Postmark
Production Considerations
For production deployments:- Use a dedicated email service - Gmail is suitable for development but not ideal for production
- Implement rate limiting - Prevent email spam and abuse
- Add email queuing - Handle bulk emails asynchronously
- Monitor deliverability - Track bounce rates and spam reports
- Set up SPF/DKIM - Improve email deliverability and prevent spoofing
Next Steps
- Test all email notification types (contact, custom plans, card plans)
- Configure email templates for better formatting
- Set up email monitoring and logging
- Consider migrating to a production email service
- Implement email retry logic for failed sends