first commit
This commit is contained in:
commit
82f8b28353
28 files changed
+1210
No files matched your search
@@ -0,0 +1,27 @@
|
||||
require "mail"
|
||||
|
||||
class ContactMailer
|
||||
def initialize(params)
|
||||
@params = params
|
||||
end
|
||||
|
||||
def build
|
||||
email = @params["email"]
|
||||
name = @params["name"]
|
||||
subject = @params["subject"]
|
||||
message = @params["message"]
|
||||
|
||||
Mail.new do
|
||||
from "noreply@netig.net"
|
||||
to "contact@netig.net"
|
||||
reply_to email
|
||||
content_type "text/plain; charset=UTF-8"
|
||||
subject subject
|
||||
body "Nom : #{name}\n\n#{message}"
|
||||
end
|
||||
end
|
||||
|
||||
def deliver
|
||||
build.deliver
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user