Commit 46ab2858 authored by David F.'s avatar David F.
Browse files

Merge branch '106-ameliorer-l-envoi-des-mails-du-formulaire-de-contact' into 'master'

Default mail from for contact us mails: refs #106.

See merge request CDSA33/OLIGAA!105
parents 4cb5d6a7 f0cd15e4
......@@ -34,3 +34,5 @@ GRETEL_TRAILS_SECRET='gretel_secret'
# Google service account Oauth 2.0 client ID for Google
# Calendar synchronization
# GOOGLE_CLIENT_ID=''
# Mainly used for ContactUs mails (usefull for SPF and DKIM)
# DEFAULT_MAIL_FROM=www@domain.tld
......@@ -24,8 +24,9 @@ class Mailer < ActionMailer::Base
def contact_us(email, sent_at = Time.now)
@mail = email
mail :from => @mail.email,
mail :from => ENV['DEFAULT_MAIL_FROM'],
:to => Settings.instance.contact_email,
:reply_to => @mail.email,
:subject => @mail.subject,
:date => sent_at
end
......
......@@ -45,4 +45,7 @@ describe Mailer do
expect(@mail.body.encoded).to match("Voici les...")
end
end
pending "TODO: contact_us"
pending "TODO: reset_password"
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment