Skip to content


Fix #292 allow space character in password #393

merged 1 commit into from

2 participants


Very simple fix to the send_email function.

@tomas tomas merged commit 800f269 into prey:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 6, 2013
  1. @simleb
Showing with 6 additions and 3 deletions.
  1. +6 −3 core/push
9 core/push
@@ -67,10 +67,13 @@ send_via_email(){
echo -e "${EMAIL_NOTICE}${EMAIL_HEADER}$(urldecode "$trace_list")${EMAIL_FOOTER}" > "$trace_file.msg"
# only add user/pass if set
- [ -n "$smtp_username" ] && local auth="username=$smtp_username password=$decrypted_pass"
- response=$(mailsender -f "$mail_from" -t "$mail_to" -u "$complete_subject" -s $smtp_server -a $file_list -o message-file="$trace_file.msg" tls=auto $auth)
+ if [ -n "$smtp_username" ]; then
+ response=$(mailsender -f "$mail_from" -t "$mail_to" -u "$complete_subject" -s $smtp_server -a $file_list -o message-file="$trace_file.msg" tls=auto username="$smtp_username" password="$decrypted_pass")
+ else
+ response=$(mailsender -f "$mail_from" -t "$mail_to" -u "$complete_subject" -s $smtp_server -a $file_list -o message-file="$trace_file.msg" tls=auto)
+ fi
- if [ -n $(find_in "$response" 'ERROR') ]; then
+ if [ -n "$(find_in "$response" 'ERROR')" ]; then
log "\n This is the complete error message: \n $response\n"
Something went wrong with that request. Please try again.