summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-01-24 14:32:15 -0300
committerTomás Touceda <chiiph@leap.se>2014-01-24 14:32:15 -0300
commit8f1ff2ef3599db215cbc3a64c98a6a28b06b16e7 (patch)
treecd781d1a3163236500a8ad8b4c1e3ce3a0b8e758
parent6200de55e78354f0a11285ea1f5916a2b9e015a7 (diff)
parent65005a655185c937dd085c7175f69c2a92e1ae0b (diff)
Merge remote-tracking branch 'refs/remotes/ivan/feature/add-non-ascii-and-charset-test'
-rwxr-xr-xsrc/swaks-batch.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/swaks-batch.sh b/src/swaks-batch.sh
index 1e81210..3949d38 100755
--- a/src/swaks-batch.sh
+++ b/src/swaks-batch.sh
@@ -16,11 +16,15 @@ if ! `hash $SWAKS 2>/dev/null`; then
exit 1
fi
-# Customize this in order to test the desired accounts
-FROM=ivan@dev.bitmask.net
-TO=test_123@dev.bitmask.net
+# Python helper to read configurations from file:
+TO=`python -c "from ConfigParser import SafeConfigParser as scp; p = scp(); p.read('options.cfg'); print p.get('Configs', 'to');"`
+
+FROM=swaks@bitmask.net # this account does not need to exist.
# NOTE: Add the swak commands below here:
-# Unicode subject and body, without charset specification
-$SWAKS --to $TO --from $FROM --header "Subject: Test -- áèīôü" --body "Howdy from swaks. ýëąĥ" --helo 'asdf.com'
+# Non-ascii subject and body, without charset specification
+$SWAKS --to $TO --from $FROM --header "Subject: Test 01 -- áèīôü" --body "Howdy from swaks. ýëąĥ" --helo 'asdf.com'
+
+# Non-ascii subject and body, with charset specification
+$SWAKS --to $TO --from $FROM --header "Content-Type: text/plain; charset='utf-8'\nSubject: Test 02 -- áèīôü" --body "Howdy from swaks. ýëąĥ" --helo 'asdf.com'