commit f45510a7d5da01546a2ba55d86bc74b270984e0e
parent 44da3fa8606b454070bba8f30dd24027fdd3c738
Author: Jaromil <jaromil@dyne.org>
Date: Fri, 9 May 2014 12:10:33 +0200
ask password only once when sending queues of emails
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/zlibs/email b/src/zlibs/email
@@ -269,7 +269,6 @@ fetch() {
# this function should send all mails in outbox
send() {
adir="$WORKDIR/Accounts"
- typeset -al all
# list mails to send
@@ -307,7 +306,7 @@ send() {
ask_password
{ test $? = 0 } || {
error "Error retrieving password for $login on $smtp"
- unset password all
+ unset password
unlock "${MAILDIRS}/outbox"
return 1 }
@@ -399,8 +398,6 @@ EOF
unlink $tmp
fi
- unset password
-
# evaluate results
if [ "$res" != "0" ]; then
error "Error sending mail, skipped"
@@ -414,6 +411,7 @@ EOF
done
+ unset password
unlock "$MAILDIRS/outbox"
return 0