Guest User

Untitled

a guest
Jun 6th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. def process_order
  2. @cart = session[:cart]
  3. recipient = "josh@ublasdoij.com"
  4. subject = "sdfsdf's sdfsdf sdfsdf sdfsfd"
  5. message = "test"
  6. OrderMailer.deliver_mailTo(recipient, subject, message)
  7. end
  8.  
  9. ## ^ This compalins Template is Missing order_mailer/mailTo.erb -- shouldnt it be using store/process_order.erb (store is the class this is in)
  10.  
  11. def process_order
  12. @cart = session[:cart]
  13.  
  14. OrderMailer.deliver_test
  15. end
  16. ## ^ this loads process_order.erb and sends the mail properly
  17.  
  18. ## Class is below
  19. class OrderMailer < ActionMailer::Base
  20.  
  21. def mailTo(recipient, subject, message, sent_at = Time.now)
  22. @subject = subject
  23. @recipients = recipient
  24. @from = "fsdfsdf@gmail.com"
  25. @sent_on = sent_at
  26. @body["title"] = 'sdf sdfsfd sdfsdf'
  27. @body["email"] = "sdfsfsdf@gmail.com"
  28. @body["message"] = message
  29. @headers = {content_type => 'text/html'}
  30. end
  31.  
  32. def test
  33. recipients "ssdfsdf@sdfsdf-sdfsdf.com"
  34. from "sdfsdf@gmail.com"
  35. subject "Thank you for Registering"
  36. body "test email"
  37. end
  38.  
  39.  
  40. end
Add Comment
Please, Sign In to add comment