[why] when received email_file's from like "Xing Ming", add has double quotes with it, the email message may end unexpectedly
From: compass-ci-reply@qq.com To: shdluan@163.com Subject: [compass-ci] Account Ready
Dear Luan ----email end
[how] delete extra double quotes
Signed-off-by: Luan Shengde shdluan@163.com --- container/mail-robot/lib/parse-apply-account-email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/container/mail-robot/lib/parse-apply-account-email.rb b/container/mail-robot/lib/parse-apply-account-email.rb index 8c55d8f..7024731 100755 --- a/container/mail-robot/lib/parse-apply-account-email.rb +++ b/container/mail-robot/lib/parse-apply-account-email.rb @@ -36,7 +36,7 @@ class ParseApplyAccountEmail
@my_info = { 'my_email' => mail_content.from[0], - 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, ''), + 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '').gsub(/"/, ''), 'my_ssh_pubkey' => [] } end