Fixed rubocops.
This commit is contained in:
parent
7070b1748c
commit
f1a42dfee9
1 changed files with 9 additions and 71 deletions
|
@ -114,68 +114,6 @@ returns
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
get possible inbound settings based on mx
|
|
||||||
|
|
||||||
map = EmailHelper.provider_inbound_mx(user, email, password, mx_domains)
|
|
||||||
|
|
||||||
returns
|
|
||||||
|
|
||||||
{
|
|
||||||
adapter: 'imap',
|
|
||||||
options: {
|
|
||||||
host: mx_domains[0],
|
|
||||||
port: 993,
|
|
||||||
ssl: true,
|
|
||||||
user: user,
|
|
||||||
password: password,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
adapter: 'imap',
|
|
||||||
options: {
|
|
||||||
host: mx_domains[0],
|
|
||||||
port: 993,
|
|
||||||
ssl: true,
|
|
||||||
user: email,
|
|
||||||
password: password,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
=end
|
|
||||||
|
|
||||||
def self.provider_inbound_mx(user, email, password, mx_domains)
|
|
||||||
inbound_mxs = []
|
|
||||||
mx_domains.each {|domain|
|
|
||||||
inbound_mx = [
|
|
||||||
{
|
|
||||||
adapter: 'imap',
|
|
||||||
options: {
|
|
||||||
host: domain,
|
|
||||||
port: 993,
|
|
||||||
ssl: true,
|
|
||||||
user: user,
|
|
||||||
password: password,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
adapter: 'imap',
|
|
||||||
options: {
|
|
||||||
host: domain,
|
|
||||||
port: 993,
|
|
||||||
ssl: true,
|
|
||||||
user: email,
|
|
||||||
password: password,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
||||||
puts "ll #{inbound_mx.inspect}"
|
|
||||||
inbound_mxs = inbound_mxs.concat(inbound_mx)
|
|
||||||
}
|
|
||||||
inbound_mxs
|
|
||||||
end
|
|
||||||
|
|
||||||
=begin
|
|
||||||
|
|
||||||
get possible inbound settings based on mx
|
get possible inbound settings based on mx
|
||||||
|
|
||||||
map = EmailHelper.provider_inbound_mx(user, email, password, mx_domains)
|
map = EmailHelper.provider_inbound_mx(user, email, password, mx_domains)
|
||||||
|
@ -268,7 +206,7 @@ returns
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def self.provider_inbound_guess(user, email, password, domain)
|
def self.provider_inbound_guess(user, email, password, domain)
|
||||||
inbound_mx = [
|
inbound = [
|
||||||
{
|
{
|
||||||
adapter: 'imap',
|
adapter: 'imap',
|
||||||
options: {
|
options: {
|
||||||
|
@ -370,7 +308,7 @@ returns
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
inbound_mx
|
inbound
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
@ -405,9 +343,9 @@ returns
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def self.provider_outbound_mx(user, email, password, mx_domains)
|
def self.provider_outbound_mx(user, email, password, mx_domains)
|
||||||
outbound_mxs = []
|
outbounds = []
|
||||||
mx_domains.each {|domain|
|
mx_domains.each {|domain|
|
||||||
outbound_mx = [
|
outbound = [
|
||||||
{
|
{
|
||||||
adapter: 'smtp',
|
adapter: 'smtp',
|
||||||
options: {
|
options: {
|
||||||
|
@ -449,9 +387,9 @@ returns
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
outbound_mxs = outbound_mxs.concat(outbound_mx)
|
outbounds = outbounds.concat(outbound)
|
||||||
}
|
}
|
||||||
outbound_mxs
|
outbounds
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
@ -487,7 +425,7 @@ returns
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def self.provider_outbound_guess(user, email, password, domain)
|
def self.provider_outbound_guess(user, email, password, domain)
|
||||||
outbound_mx = [
|
outbound = [
|
||||||
{
|
{
|
||||||
adapter: 'smtp',
|
adapter: 'smtp',
|
||||||
options: {
|
options: {
|
||||||
|
@ -569,7 +507,7 @@ returns
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
outbound_mx
|
outbound
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
@ -611,4 +549,4 @@ returns
|
||||||
mxs
|
mxs
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue