Put the email variables in .env
email_env_to_fileWrites email environment variables into a project .env file, replaces existing values, keeps other entries, adds the file to .gitignore, and returns only the written variable names.
Instructions
Write RESEND_API_KEY, RESEND_BASE_URL, RESEND_API_URL and EMAIL_FROM into a .env file in the project directory, and return only the names of what was written. RESEND_API_KEY here is a token for the platform's relay, not a Resend key, and it goes into the file and never into this conversation, so do not read the file back out to the user. These are the same variables the deployed app receives, so do not copy them into set_env. Variables already in the file are replaced, everything else is kept, and the file is added to .gitignore. Email has to be set up first: email_create does it. Needs the account token that login (or https://antideploy.com/agent.md) saves on this machine: a project key cannot read the token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | A .env file inside the project directory. Default .env; .env.local suits Next.js. | |
| directory | No | The project folder. Defaults to this server's working directory. |