Some of our websites use an email forwarding script (for about 20,000 users) that I wrote, but I am having troubles with the Bcc: header. The script simply takes mail sent to joeschmoe@domain.com and forwards it to his real email (joeschmoe@yahoo.com for example). The problem that I am having is this: When mail hits my server, I first pull out the email addresses from the headers, compare them to the DB, then resend to their real email. But when someone BCCs the letter to joeschmoe@domain.com, I am unable to pull the address from the BCC field, so the mail is never delivered. After dumping the email contents to a file, I see that the BCC insn't in the headers. I understand that the BCC is supposed to be private, but how can I pull it, so I can forward the mail?
Heres a snippet of what I am using:
1|my $parser = new MIME::Parser;
2|my $message = $parser->parse(\*STDIN) or die "$!\n";
3|my @to = $message->head->get("To");
4|my @cc = $message->head->get("Cc");
5|my @bcc = $message->head->get("Bcc");
Lines 3 & 4 work just peachy, but its line 5 that doesnt do anything.
Anyone have any idears?
Thanks
unixdown
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.