[prev in list] [next in list] [prev in thread] [next in thread]
List: imp
Subject: Re: [imp] Help with _imp_hook_spam_bounce please
From: Earnie Boyd <earnie () users ! sourceforge ! net>
Date: 2009-03-31 15:03:08
Message-ID: 20090331150308.93872odsjehxk98g () mail ! siebunlimited ! com
[Download RAW message or body]
Quoting Earnie Boyd <earnie@users.sourceforge.net>:
> Quoting Earnie Boyd <earnie@users.sourceforge.net>:
>
>> I currently have
>>
>> <?php
>> if (!function_exists('_imp_hook_spam_bounce')) {
>> function _imp_hook_spam_bounce($action)
>> {
>> $prefix = ($action == 'spam') ? 'spam-' : 'ham-';
>> return $prefix . Auth::getAuth();
>> }
>> }
>> ?>
>>
>> but instead of Auth::getAuth() I need a function to return the
>> Delivered-To: address if it exists else the To: address. The
>> reason for this is because I am pulling the mail to a common
>> account for various accounts and am wanting to report the spam from
>> this common account. Therefore the authenticated user isn't the
>> correct address to report.
>>
>
> I have hacked together the following but I would still like to know
> what object to pass into what function to get a list of message
> headers. The following only works because of the way I named my
> folders for the fetched mail.
>
And the following:
if (!function_exists('_imp_hook_spam_bounce')) {
function _imp_hook_spam_bounce($action)
{
/*echo '<pre>';var_dump($GLOBALS);echo '</pre></hr>';*/
$mbox_parts = split('\.', $_POST['mailbox']);
if ($mbox_parts[count($mbox_parts) - 1] === 'Inbox') {
unset ($mbox_parts[count($mbox_parts) - 1]);
}
$to = $mbox_parts[count($mbox_parts) - 1];
$user = Auth::getAuth();
list($user, $host) = split('@', $user);
$to .= '@' . $host;
$to = (($action == 'spam') ? 'spam-' : 'fp-') . $to;
return $to;
}
--
Earnie
-- http://for-my-kids.com/cms/
-- http://www.4offer.biz/
-- http://www.give-me-an-offer.com/
--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: imp-unsubscribe@lists.horde.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic