Forum: Ruby on Rails Setting messageid in mailer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E74567851f3c7de37351cd420b7a5044?d=identicon&s=25 thomas.rynne (Guest)
on 2005-12-08 00:09
(Received via mailing list)
Hi,
 I want to set the message-id of the messages sent using the mailer (so
that
I can recognise replies). Has anyone done this?

I've tried these in my mailer model:
  @headers["message-id"] = "12345"
  #gets ignored
and
  message_id = "12345"
  #gets ignored
and this separate bit of code:
  mail = MyMailer.create_reminder_message(user)
  mail.message_id = "123
  MyMailer.deliver(mail)
  #there's no deliver method on MyMailer

Any ideas?

thanks
Thomas
6993d6b4b6d882f421e1b45ac147f3e0?d=identicon&s=25 scott (Guest)
on 2005-12-09 06:43
(Received via mailing list)
On Dec 7, 2005, at 6:08 PM, Thomas Rynne wrote:

> Hi,
>  I want to set the message-id of the messages sent using the mailer
> (so that
> I can recognise replies). Has anyone done this?
>
> and this separate bit of code:
>   mail = MyMailer.create_reminder_message(user)
>   mail.message_id = "123
>   MyMailer.deliver(mail)
>   #there's no deliver method on MyMailer

This method should definitely work, I am using it with success.  The
deliver
method is set up by action mailer, it is not a method you add to
MyMailer
yourself.

You might also consider using TMail.new_message_id to create a message
id:

   mail.message_id = TMail.new_message_id


--
Scott Barron
Lunchbox Software
http://lunchboxsoftware.com
http://lunchroom.lunchboxsoftware.com
http://rubyi.st
This topic is locked and can not be replied to.