-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor emailJS config to use updated env variables #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Updated emailJS configuration to use new environment variables.
|
🚀 Expo preview is ready!
|
|
@Heliophist please check my PR with the env variables I put in the discord |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Refactors the app’s EmailJS error-reporting setup to use the newly named Expo public environment variables.
Changes:
- Removes the shared
emailJsConfigobject and passes env vars directly intosend(). - Updates EmailJS env variable names used for service/template/public key and template params.
- Tweaks the email template payload fields (title/name/message/email).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| process.env.EXPO_PUBLIC_EMAIL_SERVICE_ID, | ||
| process.env.EXPO_PUBLIC_EMAIL_TEMPLATE_ID, | ||
| { | ||
| email: process.env.EXPO_PUBLIC_EMAILJS_EMAIL, | ||
| title: "Signup App Error", | ||
| name: "Signup App Error Reporter", | ||
| message: `Error: ${error}\nPlatform: ${Platform.OS} with v${Platform.Version}`, | ||
| email: process.env.EXPO_PUBLIC_EMAIL, | ||
| title: "Audacity Sign Up Error Report", | ||
| name: `A ${Platform.OS} v${Platform.Version} User`, | ||
| message: `${error}`, | ||
| }, | ||
| { | ||
| publicKey: emailJsConfig.publicKey, | ||
| publicKey: process.env.EXPO_PUBLIC_EMAIL_PUBLIC_KEY, |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new EmailJS env vars are used directly without any validation. Elsewhere in the codebase required EXPO_PUBLIC_* vars are guarded with a fallback/error (e.g., src/screens/HomeScreen.js:91-97 and src/screens/SignInScreen.js:33-37). Here, passing undefined service/template/publicKey into send() will always fail and will silently degrade error reporting. Add an early guard that checks these env vars are defined and logs a clear error (without calling alertError from inside sendErrorEmail to avoid recursion) before attempting send().
Updated emailJS configuration to use new environment variables.