I am trying to override the application to send mail to activate the user. In the create method in the registration controller, I have this
urlEmail = resource.email.sub('@','-') Pony.mail( :to => resource.email, :from => " noreply@mysite.com ", :subject => "Confirm Account", :headers => { 'Content-Type' => 'text/html' }, :body => ("<h1>Welcome To My Awesome Site</h1> <p>follow this link to create your account</p> <p>http://localhost:3000/confirm-me/stuff?=" + resource.confirmhash.to_s + "/" + urlEmail.to_s + "</p>") )
This url leads to a way to activate the user. Whether this is a good way to verify your account does not matter. The problem is that when I start Pony.mail (...) I get this error
uninitialized constant RegistrationsController::Pony
I installed pony and Pony.mail works in the console. I also tried using a βponyβ at the top of the controller file, but I get
no such file to load
What do I need to do to make this work.
source share