I try to send an email with the new mailjet api (v3). Here is my config :
gemfile
gem 'mailjet'
config/initializers/mailjet.rb
Mailjet.configure do |config|
config.api_key = '<my api>'
config.secret_key = '<my_psw>'
config.default_from = 'mail@conicrea.com'
config.domain = 'localhost'
end
mailer.rb
def send_unsubscribe(user)
@user = user
@to = "paul@conicrea.com"
@from = "mail@conicrea.com"
mail(to: @to, from: @from, subject: "TTP Tork - Demande de désinscription") do |format|
format.html
end
end
user.rb
def send_unsubscribe
Mailer.send_unsubscribe(self).deliver
end
u.send_unsubscribe
In log, the mail seems to be create en send but there is no email in my mailbox and in mailjet...