Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
OHR Support
Commits
21685caf
Commit
21685caf
authored
13 years ago
by
Eric Davis
Browse files
Options
Downloads
Patches
Plain Diff
[#791] Add support for pop3s (SSL) to redmine:email:receive_pop3
parent
6f17ec6f
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/redmine/pop3.rb
+13
-1
13 additions, 1 deletion
lib/redmine/pop3.rb
lib/tasks/email.rake
+2
-0
2 additions, 0 deletions
lib/tasks/email.rake
with
15 additions
and
1 deletion
lib/redmine/pop3.rb
+
13
−
1
View file @
21685caf
...
...
@@ -18,8 +18,20 @@ module Redmine
module
POP3
class
<<
self
def
check
(
pop_options
=
{},
options
=
{})
if
pop_options
[
:ssl
]
ssl
=
true
if
pop_options
[
:ssl
]
==
'force'
Net
::
POP3
.
enable_ssl
(
OpenSSL
::
SSL
::
VERIFY_NONE
)
else
Net
::
POP3
.
enable_ssl
(
OpenSSL
::
SSL
::
VERIFY_PEER
)
end
else
ssl
=
false
end
host
=
pop_options
[
:host
]
||
'127.0.0.1'
port
=
pop_options
[
:port
]
||
'110'
port
=
pop_options
[
:port
]
port
||=
ssl
?
'995'
:
'110'
apop
=
(
pop_options
[
:apop
].
to_s
==
'1'
)
delete_unprocessed
=
(
pop_options
[
:delete_unprocessed
].
to_s
==
'1'
)
...
...
This diff is collapsed.
Click to expand it.
lib/tasks/email.rake
+
2
−
0
View file @
21685caf
...
...
@@ -140,6 +140,7 @@ Available POP3 options:
username=USERNAME POP3 account
password=PASSWORD POP3 password
apop=1 use APOP authentication (default: false)
ssl=SSL Use SSL? (default: false)
delete_unprocessed=1 delete messages that could not be processed
successfully from the server (default
behaviour is to leave them on the server)
...
...
@@ -151,6 +152,7 @@ END_DESC
pop_options
=
{
:host
=>
ENV
[
'host'
],
:port
=>
ENV
[
'port'
],
:apop
=>
ENV
[
'apop'
],
:ssl
=>
ENV
[
'ssl'
],
:username
=>
ENV
[
'username'
],
:password
=>
ENV
[
'password'
],
:delete_unprocessed
=>
ENV
[
'delete_unprocessed'
]}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment