I have been developing a web application using ROR (hosted on
webricks/windows) which makes use of ActionMailer to send out mails to
various mailing lists. Recently, we came across a use case which
required that a particular user belonging to a mailing list should not
be sent out the mails. He cannot be removed from the mailing list
either. So I devised something like a negative subscriber list, where we
remove the user after expanding the mailing lists. The downside here was
that 'outlook-client' specific rules started breaking for other members
of the mailing-list. I came to know that Actionmailer supports envelope
viz., ''Return-Path'' header for reply-to component of e-mail. I was
wondering if there is any way that we can specify such envelopes for TO
and CC fields too.
I'm looking for something like what we have in sendmail of unix,
I have been developing a web application using ROR (hosted on
webricks/windows) which makes use of ActionMailer to send out mails to
various mailing lists. Recently, we came across a use case which
required that a particular user belonging to a mailing list should not
be sent out the mails. He cannot be removed from the mailing list
either. So I devised something like a negative subscriber list,
where we
remove the user after expanding the mailing lists. The downside here
was
that 'outlook-client' specific rules started breaking for other
members
of the mailing-list. I came to know that Actionmailer supports
envelope
viz., ''Return-Path'' header for reply-to component of e-mail. I was
wondering if there is any way that we can specify such envelopes for
TO
and CC fields too.
You can set any header you want. In your mailer, set
remove the user after expanding the mailing lists. The downside here
was
that 'outlook-client' specific rules started breaking for other
members
of the mailing-list. I came to know that Actionmailer supports
envelope
viz., ''Return-Path'' header for reply-to component of e-mail. I was
wondering if there is any way that we can specify such envelopes for
TO
and CC fields too.
You can set any header you want. In your mailer, set
@headers = {'return-path' => 'foo@bar.com', ...}
Fred
Fred,
Many thanks for your lightning-quick inputs on this. I had tried doing
this with something like
Well you'd have to say {'cc' => @cc} for this to have a chance of
working.
Fred
Ah! my mistake. If I understand this right, once we set the header
fields, they would be ones to which the mails will be sent. What I want
is something like sendmail where the recipients are different from what
is indicated by the headers..
Well you'd have to say {'cc' => @cc} for this to have a chance of
working.
Fred
Ah! my mistake. If I understand this right, once we set the header
fields, they would be ones to which the mails will be sent. What I
want
is something like sendmail where the recipients are different from
what
is indicated by the headers..
ActionMailer doesn't have anything for specifiying recipients as
arguments to sendmail. You'd have to do that yourself