File: sendwelcomemail.sh

package info (click to toggle)
citadel 902-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,904 kB
  • ctags: 4,359
  • sloc: ansic: 54,083; sh: 4,226; yacc: 651; makefile: 413; xml: 40
file content (15 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash


export FOO=2600908b3f21ae7f692b973ed26e212d
export WELCOMEHTML=welcomemail.html
export WELCOMETXT=welcomemail.txt
export FROM=nobody@example.com
export TO=room_lobby
(
    printf "MIME-Version: 1.0\r\nContent-Type: multipart/alternative; \r\n boundary=$FOO\r\n\r\nThis is a multi-part message in MIME format.\r\n\r\n--$FOO\r\nContent-Type: text/plain; charset=utf-8\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n"; 
    cat $WELCOMETXT
    printf "\r\n\r\n--$FOO\r\nContent-Type: text/html; charset=US-ASCII\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n"
    cat $WELCOMEHTML; 
    printf "\r\n\r\n--$FOO--\r\n\r\n") | \
    citmail -bm -r "$FROM" "$TO"