Obie,
Would it be possible to see the mailer code in question? Feel free to
email me off-list and I can help you troubleshoot this.
- Jamis
On Sep 28, 2005, at 8:10 AM, Obie Fernandez wrote:
> I have an ActionMailer written by another programmer that I''m
trying
> to finish off. It receives an email and is supposed to reply with
> results of processing the incoming message.
>
> Incoming email processing works. Automatically sending a reply after
> processing that incoming email is another story. The documentation
> assumes you are using your ActionMailer from a controller and advises
> use of the class method deliver() to manually send an existing TMail
> instance. That doesn''t work from within the context of a
ActionMailer
> receive() method.
>
> Looking at the source code, I see that deliver() is added to the
> metaclass of ActionMailer::Base so my first attempt was to call se.f
>
> (breakpoint right before the attempt to deliver)
>
> irb (#<CoaMailer:0x3eeaf18>):009:0> self.kind_of?
> ActionMailer::Base => true
> irb(#<CoaMailer:0x3eeaf18>):010:0> self.respond_to? :deliver =>
false
> irb(#<CoaMailer:0x3eeaf18>):014:0> self.respond_to? :deliver!
=> true
>
> Okay, so I just have to invoke deliver! Nope. ArgumentError wrong
> number (1 for 0)
>
> CoaMailer.deliver(reply) fails too. I can get the behavior I want on
> the server by calling send("perform_delivery_sendmail", reply),
but
> that fails the test suite on my windows box. (Grr)
>
> I''m about to rewrite so that CoaMailer has a reply public method
and
> rhtml template. Hopefully that will let me call create_reply,
> deliver_reply inside my receive method (but I''m worried it
won''t).
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>