Skip to content

Conversation

@Pramad712
Copy link
Contributor

Updated emailJS configuration to use new environment variables.

Updated emailJS configuration to use new environment variables.
Copilot AI review requested due to automatic review settings January 28, 2026 01:38
@github-actions
Copy link

🚀 Expo preview is ready!

  • Project → audacity-music-club
  • Platforms → android, ios
  • Runtime Version → 1.0.0
  • More info

Learn more about 𝝠 Expo Github Action

@Pramad712
Copy link
Contributor Author

@Heliophist please check my PR with the env variables I put in the discord

Copy link
Contributor

Copilot AI left a 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 emailJsConfig object and passes env vars directly into send().
  • 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.

Comment on lines +37 to +46
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,
Copy link

Copilot AI Jan 28, 2026

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().

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant