reply to email functionality is not working

72 views
Skip to first unread message

bapu labade

unread,
Jun 25, 2013, 2:53:07 AM6/25/13
to mail...@googlegroups.com
Hello,
         I want to reply to email based on parent message references id & in_reply_to fields for that i am using ruby SMTP + mail ruby gem,but I am facing problem while reply to email.Also i am going through http://www.faqs.org/rfcs/rfc2822.html reply to message document.

below is the code i am trying :


-------------------------- ruby code ------------------------------------------

    options = {
                :address              => "smtp.mailgun.org",
                :port                    => 587,
                :domain               => '-----.mailgun.org',
                :user_name          => '--------------',
                :password            => '--------',
                :authentication      => 'plain',
                :enable_starttls_auto => true 
              }

    Mail.defaults do
      delivery_method :smtp, options
    end

    mail = Mail.new do
        to 'myapp@----.mailgun.org'
        from 'reply@---.mailgun.org'
        subject 'RE: This is a test email'
        reply_to 'bapu.l...@gmail.com'
        in_reply_to('<51c8320f346dd_...@redmine.mail>')
        references('<51c8320f346dd_...@redmine.mail>')
        body 'body test......'
    end

    mail.deliver!

Above code is working for to field means email is successfully send to to address.

Its not working for reply_to field and also its does not maintain parent/child message relationship. i can find any document based on reply to email + ruby.

Please let me know anything I am missing. any help really appreciate:


Thanks,
Bapu L.

Reply all
Reply to author
Forward
0 new messages