Guest User

Untitled

a guest
Nov 25th, 2017
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. def send_contact_email params
  2. mail({from: params[:email],
  3. to: 'inquiries@gmail.ca',
  4. body: params[:message],
  5. content_type: "text/html",
  6. subject: "Inquiry from [#{ params[:name] }]"})
  7. end
  8.  
  9. UserMailer.send_contact_email(params).deliver_now
  10.  
  11. def welcome user, token
  12. @resource = user
  13. @token = token
  14. mail({ to: user.email,
  15. content_type: "text/html",
  16. subject: "Thankyou!"})
  17. end
  18.  
  19. UserMailer.welcome(u,hashed_token).deliver_now
  20.  
  21. UserMailer#welcome: processed outbound mail in 13.9ms
  22.  
  23. Sent mail to email@gmail.com (10364.1ms)
  24. Date: Sat, 25 Nov 2017 19:39:19 +1100
  25. From: no-reply@gmail.cl
  26. To: email@gmail.com
  27. Message-ID: <5a192c37982fc_a9663ff3cec3e51845790@mac.local.mail>
  28. Subject: Gracias!
  29. Mime-Version: 1.0
  30. Content-Type: text/html;
  31. charset=UTF-8
  32. Content-Transfer-Encoding: 7bit
  33.  
  34. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  35. <html xmlns="http://www.w3.org/1999/xhtml">
  36. <head>
  37. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  38. <title>The Project | Email Template</title>
  39. </head>
  40. <body style="margin: 0; padding: 0;">
  41. <p>Hola email@gmail.com!</p>
  42.  
  43. <p>Se ha solicitado cambiar tu contrasena. Puedes hacerlo a traves del siguiente link.</p>
  44.  
  45. <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>
  46.  
  47. <p>Si no lo solicito, ignore este correo electronico.</p>
  48. <p>Su contrasena no cambiara hasta que acceda al link de arriba y cree una nueva.</p>
  49.  
  50. </body>
  51. </html>
  52.  
  53. => #<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