You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a function that sends an email, using mailjet. API KEY and API SECRET are stored in a .env file located in supabase/functions/send-email folder.
I've installed supabase locally (npm install supabase) and tested as is in a simple TS file:
My send-email/index.ts + .env are deployed to supabase.com as is
supabase functions deploy send-email --project-ref <project_id>
in index.ts I have a console.log as previously on the 2 environment variables values
When I execute the function remotely by a curl command I got an error mailjet but the log of the Edge fiunction send-email on supabase.com shows me that the 2 environment variables are 'undefined'.
url -X POST 'https://<project_id>.supabase.co/functions/v1/send-email'
-H "Content-Type: application/json"
-H "Authorization: Bearer "
-d '{
"to": ["a_user@an_email.com"],
"subject": "Test depuis Supabase Edge Function",
"message": "Ceci est un test via Supabase",
"collectionName": "Ma Collection",
"fileCount": 1
}'
Thanks for your help
Laurent System information
Rerun the failing command with --create-ticket flag.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I have a function that sends an email, using mailjet. API KEY and API SECRET are stored in a .env file located in supabase/functions/send-email folder.
I've installed supabase locally (npm install supabase) and tested as is in a simple TS file:
// test_deno.ts
import "https://deno.land/std@0.224.0/dotenv/load.ts";
console.log("MAILJET_API_KEY:", Deno.env.get("MAILJET_API_KEY"));
console.log("MAILJET_API_SECRET:", Deno.env.get("MAILJET_API_SECRET"));
The values are well displayed when executed.
My send-email/index.ts + .env are deployed to supabase.com as is
supabase functions deploy send-email --project-ref <project_id>
in index.ts I have a console.log as previously on the 2 environment variables values
When I execute the function remotely by a curl command I got an error mailjet but the log of the Edge fiunction send-email on supabase.com shows me that the 2 environment variables are 'undefined'.
url -X POST 'https://<project_id>.supabase.co/functions/v1/send-email'
-H "Content-Type: application/json"
-H "Authorization: Bearer "
-d '{
"to": ["a_user@an_email.com"],
"subject": "Test depuis Supabase Edge Function",
"message": "Ceci est un test via Supabase",
"collectionName": "Ma Collection",
"fileCount": 1
}'
Thanks for your help
Laurent
System information
Rerun the failing command with
--create-ticket
flag.Additional context
If applicable, add any other context about the problem here.
The text was updated successfully, but these errors were encountered: