Get the From: header of currently sent mail

Hello,

in my setup I have patched lib/RT/Action/Notify.pm in such way that it
adds some attachments to a mail. In some cases we send mails that have
no-reply address in From: and Reply-To: and I would like to send these
mails without those attachments. However, I have not found a way to
query either From: or Reply-To:.

Could you please tell me how to check these headers inside Notify.pm?
And if it is not possible, could you please give me a hint on how to do
it some other way?

Regards,
Martin

Hello,

in my setup I have patched lib/RT/Action/Notify.pm in such way that it
adds some attachments to a mail. In some cases we send mails that have
no-reply address in From: and Reply-To: and I would like to send these
mails without those attachments. However, I have not found a way to
query either From: or Reply-To:.

Could you please tell me how to check these headers inside Notify.pm?
And if it is not possible, could you please give me a hint on how to do
it some other way?

Hi,

I am just bumping this mail as I was not yet able to come with a
solution. I know that I can’t be the only one with such requirements
around here.

Thanks,
Martin

in my setup I have patched lib/RT/Action/Notify.pm in such way that it
adds some attachments to a mail. In some cases we send mails that have
no-reply address in From: and Reply-To: and I would like to send these
mails without those attachments. However, I have not found a way to
query either From: or Reply-To:.

Could you please tell me how to check these headers inside Notify.pm?
And if it is not possible, could you please give me a hint on how to do
it some other way?

If you’re modifying Notify.pm, you’ve already seen how it gets the
RT-Send-Cc and RT-Send-Bcc headers. Try using similar code and if it
doesn’t work, provide code that doesn’t work and how it fails.

-kevin