search for: deliver_

Displaying 7 results from an estimated 7 matches for "deliver_".

Did you mean: delivery
2007 Jun 19
1
ActionMailer cancel send from one of deliver_* methods
Seems like executing a return in one of the deliver_* methods of ActionMailer doesn''t cancel the delivery. The template is still read right after the return method has been executed and because all variables in the template are empty, all kinds of errors occur. I need to validate the email (and test whether it actually exists) before a deli...
2008 Oct 17
1
ActionMailer template gets nil param from non-nil deliver_
Rails 1.2.6 ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] =Summary: I pass a non-nil parameter to an ActionMailer class''s deliver_* method. The corresponding * instance method for the ActionMailer gets a nil instead. Disaster ensues. Will someone please tell me what I''m doing wrong? =Details: I have an ActionMailer::Base class with the following template method: def request(req) # Control reaches here. req...
2006 Jul 21
3
ActionMailer doesn''t send any mail
I''ve configured actionmailer following the documentation, adding to environment.rb everything for using my mail account on yahoo using deliver_* methods to send a mail. I can see the mail in development.log and everything seems fine, but no mails so far. Is there a place where can I see what the server answered, or something to look at to solve the problem ? I have no clue, I''ve trying for hours ... ngw -- Nicholas Wiel...
2009 Aug 06
18
Best Practices Question
Should models call action mailers, or should those calls always originate from controllers? For example, should user.forgot_password send the email, or should the user_controller.forgot_password? Just looking for some opinions... Thanks, Tom
2006 Aug 16
3
Validate your forms with a table-less model
...o a database table. My code in the controller is this at the moment and this works but if the validation fails it just displays the flash message i have provided, not highlighting the boxes in red. def contact @contact = Contact.new(params[:contact]) if @contact.valid? OrderMailer::deliver_send_an_email() # notice the ''deliver_'' prefix flash[:notice] = ''Query was successfully created.'' redirect_to :action => ''contactus'' else flash[:notice] = ''Query was not successfully created.'' red...
2006 Aug 15
0
ActionMailer
...an_email() @recipients = "myadress@isp.co.uk" @from = "myaddress@isp.co.uk" @subject = "Ruby Test" @body = "The Body" end end View: send_an_email.rhtml <p>Email was sent!.</p> Controller: Admin.rb def sendmail OrderMailer::deliver_send_an_email() # notice the ''deliver_'' prefix end environment.rb ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.server_settings = { :address => "auth.smtp.1and1.co.uk", :port => 25, :user_name => "myusername", :password => &q...
2004 Oct 25
1
Rails 0.8: Just shy of 100 additions, changes, tweaks, and fixes!
...-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org Subject: [Signed up] Welcome david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org Hello there, Mr. david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org You never actually call the instance methods like signed_up directly. Instead, you call class methods like deliver_* and create_* that are automatically created for each instance method. So if the signed_up method sat on ApplicationMailer, it would look like this: ApplicationMailer.create_signed_up("david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org") # => tmail object for testing Applicati...