diff options
author | EuAndreh <eu@euandre.org> | 2025-04-16 11:20:43 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-04-16 11:20:43 -0300 |
commit | d36c2e459a74ec67e523539eb98b78b95b01432a (patch) | |
tree | a7099fbfbdab6a21f59b6efe095bffb40ceae646 /src/content/tils/2020/09/04/cli-email-fun-profit.adoc | |
parent | src/content/style.css: Show header on hover only (diff) | |
download | euandre.org-d36c2e459a74ec67e523539eb98b78b95b01432a.tar.gz euandre.org-d36c2e459a74ec67e523539eb98b78b95b01432a.tar.xz |
src/content/: Normalize [source,$lang] code blocks
Diffstat (limited to 'src/content/tils/2020/09/04/cli-email-fun-profit.adoc')
-rw-r--r-- | src/content/tils/2020/09/04/cli-email-fun-profit.adoc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/content/tils/2020/09/04/cli-email-fun-profit.adoc b/src/content/tils/2020/09/04/cli-email-fun-profit.adoc index 5476fac..1da1154 100644 --- a/src/content/tils/2020/09/04/cli-email-fun-profit.adoc +++ b/src/content/tils/2020/09/04/cli-email-fun-profit.adoc @@ -15,7 +15,7 @@ Reason 3 is the fun part, reasons 1 and 2 are the profit part. First {ssmpt}[install and configure SSMTP] for using, say, Gmail as the email server: -[source,shell] +[source,sh] ---- # file /etc/ssmtp/ssmtp.conf FromLineOverride=YES @@ -31,7 +31,7 @@ AuthPass=password Now install {mailutils}[GNU Mailutils] (`sudo apt-get install mailutils` or the equivalent on your OS), and send yourself your first email: -[source,shell] +[source,sh] ---- echo body | mail -aFrom:email@example.com email@example.com -s subject ---- @@ -39,7 +39,7 @@ echo body | mail -aFrom:email@example.com email@example.com -s subject And that's about it, you've got mail. Here are some more places where it might be applicable: -[source,shell] +[source,sh] ---- # report a backup cronjob, attaching logs set -e @@ -62,10 +62,11 @@ trap finish EXIT do-long-backup-cmd-here ---- -.... +[source,sh] +---- # share the output of a cmd with someone some-program | mail someone@example.com -s "The weird logs that I was talking about" -.... +---- ...and so on. |