Guest User

Untitled

a guest
Jan 19th, 2019
865
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. > rails console
  2.  
  3. irb> c = Contact.new
  4. => #<Contact:0x007fe587c1c0b8>
  5.  
  6. irb> c.email = "hello@goodbye.com"
  7. => "hello@goodbye.com"
  8.  
  9. irb> c.name = "It's my name"
  10. => "It's my name"
  11.  
  12. irb> c.message = "No subject"
  13. => "No subject"
  14.  
  15. irb(main):005:0> c.deliver
  16.  
  17. Console Output:
  18.  
  19. MailForm::Notifier#contact: processed outbound mail in 29.8ms
  20.  
  21. Sent mail to myemailaddress@gmail.com (285.5ms)
  22. Date: Fri, 05 Sep 2020 00:17:49 -0400
  23. From: It's my name <hello@goodbye.com>
  24. To: myemailaddress@gmail.com
  25. Message-ID: <5409396d8fe66_14dda3ff2c180c46c84468@DOPE-Macbook-Pro.local.mail>
  26. Subject: My Contact Form
  27. Mime-Version: 1.0
  28. Content-Type: text/html;
  29. charset=UTF-8
  30. Content-Transfer-Encoding: 7bit
  31.  
  32. <h4 style="text-decoration:underline">My Contact Form</h4>
  33.  
  34.  
  35. <p><b>Name:</b>
  36. It&#39;s my name</p>
  37.  
  38. <p><b>Email:</b>
  39. hello@goodbye.com</p>
  40.  
  41. <p><b>Message:</b>
  42. No subject</p>
  43.  
  44. => true
Add Comment
Please, Sign In to add comment