Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def process_order
- @cart = session[:cart]
- recipient = "josh@ublasdoij.com"
- subject = "sdfsdf's sdfsdf sdfsdf sdfsfd"
- message = "test"
- OrderMailer.deliver_mailTo(recipient, subject, message)
- end
- ## ^ This compalins Template is Missing order_mailer/mailTo.erb -- shouldnt it be using store/process_order.erb (store is the class this is in)
- def process_order
- @cart = session[:cart]
- OrderMailer.deliver_test
- end
- ## ^ this loads process_order.erb and sends the mail properly
- ## Class is below
- class OrderMailer < ActionMailer::Base
- def mailTo(recipient, subject, message, sent_at = Time.now)
- @subject = subject
- @recipients = recipient
- @from = "fsdfsdf@gmail.com"
- @sent_on = sent_at
- @body["title"] = 'sdf sdfsfd sdfsdf'
- @body["email"] = "sdfsfsdf@gmail.com"
- @body["message"] = message
- @headers = {content_type => 'text/html'}
- end
- def test
- recipients "ssdfsdf@sdfsdf-sdfsdf.com"
- from "sdfsdf@gmail.com"
- subject "Thank you for Registering"
- body "test email"
- end
- end
Add Comment
Please, Sign In to add comment