Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
20888803
Commit
20888803
authored
Aug 24, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore empty incoming messages.
parent
e449426a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
0 deletions
+10
-0
app/mailers/email_rejection_mailer.rb
app/mailers/email_rejection_mailer.rb
+2
-0
app/workers/email_receiver_worker.rb
app/workers/email_receiver_worker.rb
+2
-0
config/mail_room.yml.example
config/mail_room.yml.example
+2
-0
doc/reply_by_email/README.md
doc/reply_by_email/README.md
+4
-0
No files found.
app/mailers/email_rejection_mailer.rb
View file @
20888803
...
...
@@ -3,6 +3,8 @@ class EmailRejectionMailer < BaseMailer
@reason
=
reason
@original_message
=
Mail
::
Message
.
new
(
original_raw
)
return
unless
@original_message
.
from
headers
=
{
to:
@original_message
.
from
,
subject:
"[Rejected]
#{
@original_message
.
subject
}
"
...
...
app/workers/email_receiver_worker.rb
View file @
20888803
...
...
@@ -18,6 +18,8 @@ class EmailReceiverWorker
def
handle_failure
(
raw
,
e
)
Rails
.
logger
.
warn
(
"Email can not be processed:
#{
e
}
\n\n
#{
raw
}
"
)
return
unless
raw
.
present?
can_retry
=
false
reason
=
nil
...
...
config/mail_room.yml.example
View file @
20888803
...
...
@@ -14,6 +14,8 @@
# :name: "inbox"
# # Always "sidekiq".
# :delivery_method: sidekiq
# # Always true.
# :delete_after_delivery: true
# :delivery_options:
# # The URL to the Redis server used by Sidekiq. Should match the URL in config/resque.yml.
# :redis_url: redis://localhost:6379
...
...
doc/reply_by_email/README.md
View file @
20888803
...
...
@@ -59,6 +59,8 @@ In this example, we'll use the Gmail address `gitlab-replies@gmail.com`. If you'
:name: "inbox"
# Always "sidekiq".
:delivery_method: sidekiq
# Always true.
:delete_after_delivery: true
:delivery_options:
# The URL to the Redis server used by Sidekiq. Should match the URL in config/resque.yml.
:redis_url: redis://localhost:6379
...
...
@@ -144,6 +146,8 @@ TODO
:name: "inbox"
# Always "sidekiq".
:delivery_method: sidekiq
# Always true.
:delete_after_delivery: true
:delivery_options:
# The URL to the Redis server used by Sidekiq. Should match the URL in config/resque.yml.
:redis_url: redis://localhost:6379
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment