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/2021/01/12 | |
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/2021/01/12')
-rw-r--r-- | src/content/tils/2021/01/12/curl-awk-emails.adoc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/content/tils/2021/01/12/curl-awk-emails.adoc b/src/content/tils/2021/01/12/curl-awk-emails.adoc index 875c655..d432da2 100644 --- a/src/content/tils/2021/01/12/curl-awk-emails.adoc +++ b/src/content/tils/2021/01/12/curl-awk-emails.adoc @@ -18,7 +18,7 @@ write a solution. The first part was the easiest: store the email in a file: -[source,shell] +[source,sh] ---- # ~/.config/mutt/muttrc: set sendmail=~/bin/enqueue-email.sh @@ -32,7 +32,7 @@ cat - > "$HOME/mbsync/my-queued-emails/$(date -Is)" Now that I had the email file store locally, I needed a program to send the email from the file, so that I could create a cronjob like: -[source,shell] +[source,sh] ---- for f in ~/mbsync/my-queued-emails/*; do ~/bin/dispatch-email.sh "$f" && rm "$f" @@ -43,7 +43,7 @@ The `dispatch-email.sh` would have to look at the `From:` header and decide which SMTP server to use. As I {found-out-article}[found out] that {curl}[curl] supports SMTP and is able to send emails, this is what I ended up with: -[source,shell] +[source,sh] ---- #!/bin/sh -eu @@ -102,7 +102,7 @@ array. I even did it incrementally: -[source,shell] +[source,sh] ---- $ H='To: to@example.com, to2@example.com\nCc: cc@example.com, cc2@example.com\nBcc: bcc@example.com,bcc2@example.com\n' $ printf "$H" | awk '/^To: .*$/ { print $0 }' |