summaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-09-16 21:56:02 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-09-16 21:56:02 +0000
commita987649b1afcd0d66c65c5da710e2a26d24b09c2 (patch)
treec4e5373cf782b0653f448a5ca1ea8413fbb35815 /extra
parent9afaf26d66e5cef3e49dfa93c7dd3e366a0ea246 (diff)
downloadredmine-a987649b1afcd0d66c65c5da710e2a26d24b09c2.tar.gz
redmine-a987649b1afcd0d66c65c5da710e2a26d24b09c2.zip
mailhandler: fixes exit status and adds an explicit message if response code is 403.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1868 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'extra')
-rw-r--r--extra/mail_handler/rdm-mailhandler.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/extra/mail_handler/rdm-mailhandler.rb b/extra/mail_handler/rdm-mailhandler.rb
index 498c2cb04..0f8020c76 100644
--- a/extra/mail_handler/rdm-mailhandler.rb
+++ b/extra/mail_handler/rdm-mailhandler.rb
@@ -112,7 +112,10 @@ class RedmineMailHandler
debug "Posting to #{uri}..."
response = Net::HTTPS.post_form(URI.parse(uri), data)
debug "Response received: #{response.code}"
- response.code == 201 ? 0 : 1
+
+ puts "Request was denied by your Redmine server. " +
+ "Please, make sure that 'WS for incoming emails' is enabled in application settings and that you provided the correct API key." if response.code == '403'
+ response.code == '201' ? 0 : 1
end
private