Skip to content

create-a-container: Remove shell-based mail command #51

@runleveldev

Description

@runleveldev

Issue: Replace shell-based mail command with native Node.js email library

Description:
The current implementation sends email using a shell command:

const mailCmd = `echo "${details}" | mail -r accounts@opensource.mieweb.org -s "New Intern Account Request" devopsalerts@mieweb.com`;

This approach relies on system utilities and shell execution, which introduces potential security and reliability issues.

Recommendation:
Use a Node.js email library such as [nodemailer](https://www.npmjs.com/package/nodemailer) to send emails directly within the application.

Benefits:

  • Avoids shell injection and command execution risks
  • Works across platforms without relying on system mail utilities
  • Provides structured error handling and better logging
  • Easier to extend for HTML templates, attachments, or SMTP authentication

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions