jetmore / swaks

Swaks - Swiss Army Knife for SMTP
http://jetmore.org/john/code/swaks/
GNU General Public License v2.0
848 stars 86 forks source link

Add support for (semi-)arbitrary tokens #36

Open jetmore opened 3 years ago

jetmore commented 3 years ago

Imagine a situation where a user wants to send a link to a report every night. The text of the email is static except for the link. Rather than forcing the user to rebuild the full body each night, offer the ability for the user to reference a custom token in the body, and define the custom token on the command line.

$ cat body.txt
The result of the night widget report is available and can be viewed at %REPORT_URL%
$ swaks -t report@example.com --body body.txt --token REPORT_URL:http://example.com/report/20210421.html

Not convinced about the name of --token or that argument format, but that's the idea