cmor_contact 0.0.42.pre → 0.0.43.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/mailers/cmor/contact/contact_request_mailer.rb +2 -1
- data/lib/cmor/contact/configuration.rb +4 -0
- data/lib/generators/cmor/contact/install/templates/initializer.rb +22 -0
- data/spec/dummy/log/test.log +1006 -0
- data/spec/mailers/cmor/contact/contact_request_mailer_spec.rb +20 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92713d31b219505dfa10d3be2d920a2a22ad8f745b3941a83010e3963e76fe92
|
4
|
+
data.tar.gz: '09d2419e62ad3627eed16bcd4c547dd18a3e2402448e2a6bf8ca8111e863b544'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5852ce182a8df6f8b55969b76dc466c3e196839a7744ee689e17a4e6b03af606aef52d25c0c6bbd7e90213ffa642ab0fda092bcf3681e54206436ba21ae50257
|
7
|
+
data.tar.gz: ab490158c3976162598640151b3a60e87befef60c79ade39e57b06ee817f1b5b9bdbe5d78f0df163f0df7fcd6174f3315ce270f1392126678d93b6c70e9c661f
|
@@ -21,7 +21,8 @@ module Cmor::Contact
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def notification_sender(contact_request)
|
24
|
-
|
24
|
+
Cmor::Contact::Configuration.sender.call(contact_request)
|
25
|
+
# "#{contact_request.name} <#{contact_request.email}>"
|
25
26
|
end
|
26
27
|
|
27
28
|
def notification_recipients
|
@@ -32,6 +32,10 @@ module Cmor
|
|
32
32
|
'controls form-actions well'
|
33
33
|
end
|
34
34
|
|
35
|
+
mattr_accessor :sender do
|
36
|
+
->(contact_request) { "#{contact_request.name} <#{contact_request.email}>" }
|
37
|
+
end
|
38
|
+
|
35
39
|
mattr_accessor :recipients do
|
36
40
|
->(environment) { "jane.doe@domain.local" }
|
37
41
|
end
|
@@ -21,6 +21,28 @@ Cmor::Contact.configure do |config|
|
|
21
21
|
}.with_indifferent_access[environment.to_sym]
|
22
22
|
end
|
23
23
|
|
24
|
+
# Configure your contact request sender here.
|
25
|
+
#
|
26
|
+
# Default:
|
27
|
+
#
|
28
|
+
# config.sender = lambda do |contact_request|
|
29
|
+
# "#{contact_request.name} <#{contact_request.email}>"
|
30
|
+
# end
|
31
|
+
#
|
32
|
+
# You may want to reconfigure this to use a static email address from
|
33
|
+
# your domain to avoid being marked as spammer when contact requests
|
34
|
+
# are sent from invalid addresses.
|
35
|
+
#
|
36
|
+
# Example:
|
37
|
+
#
|
38
|
+
# config.sender = lambda do |contact_request|
|
39
|
+
# "My Application <contact@example.com>"
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
config.sender = lambda do |contact_request|
|
43
|
+
"#{contact_request.name} <#{contact_request.email}>"
|
44
|
+
end
|
45
|
+
|
24
46
|
# Configure your input field css classes here.
|
25
47
|
#
|
26
48
|
# Default: config.input_name_css_classes = 'form-control'
|