phcdevworks_mailer_form 0.0.2b → 0.0.3b
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d1f2cc84142f627b3672ed4add5a00bade0900db9e6db8d93e7c73f7d1fc168
|
4
|
+
data.tar.gz: 8dd583e21c7d0397f3ac265217f01ab764813448c737b6d603ff3aaa59f9008e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e34174d360d4e37a70eee0174cc7aab91509e8ef0c33b4b8cb031ea3507adab7cb8535c89a3d90f2dde4225f5888f100d1c162f182fcb281f35acc951b5ceeb
|
7
|
+
data.tar.gz: f4695339260479eca2a6f7db57e66963cf1b08774cf411e3de7fb7dc3c537873884d44e59996933b03538c81aa4fd53e27cad44a667da6c739e2f175bda24456
|
@@ -1,20 +1,22 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
module PhcdevworksMailerForm
|
2
|
+
class FormMailers < MailForm::Base
|
3
|
+
|
4
|
+
# Mailer Fields
|
5
|
+
attributes :mailer_name, :validate => true
|
6
|
+
attributes :mailer_email, :validate => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
|
7
|
+
attributes :mailer_department
|
8
|
+
attributes :mailer_subject
|
9
|
+
attributes :mailer_message
|
10
|
+
attribute :mailer_captcha, :captcha => true
|
11
|
+
|
12
|
+
# Mailer Header
|
13
|
+
def headers
|
14
|
+
{
|
15
|
+
:subject => "Website Contact",
|
16
|
+
:to => "info@phcnetworks.net",
|
17
|
+
:from => %("#{mailer_name}" <#{mailer_email}>)
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
18
21
|
end
|
19
|
-
|
20
|
-
end
|
22
|
+
end
|