When are Object Mailer created?
Added by sean chan over 14 years ago
I was using a plugin named "redmine_messenger", which enables a mail notification and a jabber message sent to anyone related to the issue or timer.
Here's the problem :
===============
when I restart the redmine server, I updated an issue ,and the message will be sent to a client (spark client) connected to Jabber server(openfire) at first time.
when I was trying to do the same operation (update the same issue or anything else that could trigger the Mailer ), it wasn't working at all.
I override the Mailer Ojbect's method "def to_s" in both "app/models/Mailer.rb" and "plugin/redmine_messenger/Mailer.rb", in order to find out the source of the Mailer which enables to send mails and jabber messages.and I found out that it is "plugin mailer" at the first time when I restart the redmine server , and it becomes to "models/mailer" when second!!!
======================
Here's the Question :
======================
I am curious about when the Mailer object was created?I can't find where it was created.....:(
and I am pretty curious about why it succeed delivering the jabber message first time using plugin Mailer, and fails at second time by using model Mailer instead of plugin Mailer?
am I not getting it right at how the object was derived at Ruby?
======================
thanks for help....:)