Setting Return-Path in mail gem

96 views
Skip to first unread message

Christian

unread,
Dec 14, 2009, 2:08:54 PM12/14/09
to Ruby's Mail Discussion Group
Hi,

Recently I kicked the ActiveMailer out the door to grab the Mail gem
as my new mail framework, however - there is on problem I cant get
around.

I have tried different ways of setting the return-path but it seems
not to work. Maby someone here can point me to the solution.

The odd think is that the return-path seems to be set, but when I
receive the email, it is set as the FromField.

mail = Mail.new do
to "t...@someemail.com"
from "fr...@someemail.com"
subject "Can't set the return-path"
self['return-path'] = "bou...@someemail.com" #this
seems to set the return-path prior to sending
message_id "<#{mail_id}@someemail.com>"
body "body"
end

#
# here the Return Path seems to be set as "bou...@someemail.com"
#
mail.deliver!

#
# when the email is received, the return path is set as
"fr...@someemail.com"
#

I also tried the new :headers => {} function.

Any help would be great - I have been struggling with this for days.

Christian

Mikel Lindsaar

unread,
Dec 14, 2009, 5:06:21 PM12/14/09
to mail...@googlegroups.com
On Tue, Dec 15, 2009 at 6:08 AM, Christian <persso...@gmail.com> wrote:
# here the Return Path seems to be set as "bou...@someemail.com"
#
mail.deliver!

# when the email is received, the return path is set as
"fr...@someemail.com"
#

Any help would be great - I have been struggling with this for days.

If you have been struggling with it for days, then it is most likely a bug.  I tried to design Mail to be as "struggle-free" as possible.

Please file a ticket on github.

Mikel 

--
http://lindsaar.net/
Rails, RSpec and Life blog....


Reply all
Reply to author
Forward
0 new messages