Envelopes using ActionMailer

Hello,

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,

$sendmail [email protected]
From:[email protected]
To: [email protected]
Subject: Test
Hellows…

$

Any help would be of immense help to me. Please do let me know if you
require any other information from my end.

Regards,
Shankar.

On 27 May 2008, at 10:25, Shankar N. wrote:

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’ => ‘[email protected]’, …}

Fred

Frederick C. wrote:

On 27 May 2008, at 10:25, Shankar N. wrote:

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’ => ‘[email protected]’, …}

Fred

Fred,

Many thanks for your lightning-quick inputs on this. I had tried doing
this with something like

@cc = [“[email protected]”,“[email protected]”]
.
.
@headers = {‘cc’ => ‘[email protected]’}

The mails actually went through to [email protected] where as I wanted them to
go only to [email protected], [email protected].

Please let me know if I am missing something gross here.

Regards,
Shankar.

On 27 May 2008, at 10:49, Shankar N. wrote:

them to
go only to [email protected], [email protected].

Well you’d have to say {‘cc’ => @cc} for this to have a chance of
working.

Fred

Frederick C. wrote:

On 27 May 2008, at 10:49, Shankar N. wrote:
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…

I’ll put it this way…

x,y ,z are members of the list ‘foo’ and:

@cc = [“[email protected]”,“[email protected]”,“[email protected]”]

Here z should not be sent a mail, and the cc fields for the mails sent
to x and y should still read the cc fields as ‘foo’.

~Shankar.

On 27 May 2008, at 11:09, Shankar N. wrote:

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

Fred

Frederick C. wrote:

On 27 May 2008, at 11:09, Shankar N. wrote:

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

Fred

Okay. Given that the application is hosted on a windows server, I dont
think its possible to implement sendmail in my case. Please correct me
if I am missing something.

Thanks so much for all your help on this.

~Shankar.