Tuesday, December 4, 2007

Ruby ActionMailer Reply-To

Setting Reply-To in ActionMailer is a little easier than you might think. But, you don't do it like you would expect... strangely enough, especially for Ruby.

You would expect:
to "john@john.com"
from "joe@joseph.com"
subject "Are you coming?"
body "Coming to the big event tonight?"
reply-to "inbox@joseph.com"

But NO~! You set that in the headers field:
to "john@john.com"
from "joe@joseph.com"
subject "Are you coming?"
body "Coming to the big event tonight?"
headers 'reply-to'=>'inbox@joseph.com'

No comments: