Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def send_contact_email params
- mail({from: params[:email],
- to: 'inquiries@gmail.ca',
- body: params[:message],
- content_type: "text/html",
- subject: "Inquiry from [#{ params[:name] }]"})
- end
- UserMailer.send_contact_email(params).deliver_now
- def welcome user, token
- @resource = user
- @token = token
- mail({ to: user.email,
- content_type: "text/html",
- subject: "Thankyou!"})
- end
- UserMailer.welcome(u,hashed_token).deliver_now
- UserMailer#welcome: processed outbound mail in 13.9ms
- Sent mail to email@gmail.com (10364.1ms)
- Date: Sat, 25 Nov 2017 19:39:19 +1100
- From: no-reply@gmail.cl
- To: email@gmail.com
- Message-ID: <5a192c37982fc_a9663ff3cec3e51845790@mac.local.mail>
- Subject: Gracias!
- Mime-Version: 1.0
- Content-Type: text/html;
- charset=UTF-8
- Content-Transfer-Encoding: 7bit
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>The Project | Email Template</title>
- </head>
- <body style="margin: 0; padding: 0;">
- <p>Hola email@gmail.com!</p>
- <p>Se ha solicitado cambiar tu contrasena. Puedes hacerlo a traves del siguiente link.</p>
- <button style="color:white; background:#FF5722; border:0; border-radius:0; padding:15px; font-size:16px;"><a style="color:white; text-decoration: none;" href="http://localhost:3000/users/password/edit?reset_password_token=a9d57947ffb8c077a2b58239d0c6afec91e7c7bb9424c36cb362d6682341c086">Cambiar contrasena</a></button>
- <p>Si no lo solicito, ignore este correo electronico.</p>
- <p>Su contrasena no cambiara hasta que acceda al link de arriba y cree una nueva.</p>
- </body>
- </html>
- => #<Mail::Message:70316446670780, Multipart: false, Headers: <Date: Sat, 25 Nov 2017 19:39:19 +1100>, <From: no-reply@gmail.cl>, <To: email@gmail.com>, <Message-ID: <5a192c37982fc_a9663ff3cec3e51845790@mac.local.mail>>, <Subject: Gracias!>, <Mime-Version: 1.0>, <Content-Type: text/html>, <Content-Transfer-Encoding: 7bit>>
Add Comment
Please, Sign In to add comment