PDA

View Full Version : Bounced Email Handling


minstrel
07-10-2008, 04:02 PM
Nope, maybe something for a future version, but on vBorg there are a couple of modifications that are meant to handle bounced emails:

EZ Bounced Email Management for Admins (http://www.vbulletin.org/forum/showthread.php?t=138884)

The second one adds a link to the email header, though both would require modifications to deal with GAZ related bounced emails.

How do I do this?

Morgan
07-10-2008, 06:54 PM
Not familiar with that modification. You'd need to look at that modification, see what header it adds, and possibly use the gaz_send_email_headers hook to add a plugin with the extra header (how to add a plugin (http://www.vbulletin.com/docs/html/main/add_plugin?manualversion=30506500)).

minstrel
07-11-2008, 02:46 AM
That didn't work.

Here's what needs to be added:

// add EZBounce headers
$bounceurl = $vbulletin->options['ezb_admincpurl'] . "/ezbounce.php?u=" . $userid;
$bouncestring = "<a href=\"$bounceurl\" target=\"_blank\">$bounceurl</a>";
$headers .= 'X-EZbouncer: ' . $bouncestring . $delimiter;


When I create a plugin per your instructions, what gets added is missing the $userid, so it's useless:

X-EZbouncer: <a href="/ezbounce.php?u=" target="_blank">/ezbounce.php?u=</a>

Morgan
07-11-2008, 03:51 AM
You'll need to check the GAZ mail function in the gaz_class_process.php file to see what, if any, variable containing the user ID is available and replace $userid with the GAZ user ID variable, if available, and if there is not such a variable, then you'd need to edit GAZ to add such a variable, and then use the added variable name in place of $userid in the modification code that is used in the plugin at the gaz_send_email_headers hook.

minstrel
08-31-2008, 01:54 PM
I edited (created? not sure) the plugin gaz_send_email_headers and tried

// add EZBounce headers
$bounceurl = $vbulletin->options['ezb_admincpurl'] . "/ezbounce.php?u=" . $userid;
$bouncestring = "<a href=\"$bounceurl\" target=\"_blank\">$bounceurl</a>";
$headers .= 'X-EZbouncer: ' . $bouncestring . $delimiter;

Note: This is all that that plugin includes. This gave me the following header in the email:

X-EZbouncer: <a href="/ezbounce.php?u=" target="_blank">/ezbounce.php?u=</a>

I then tried changing $userid to userid:

// add EZBounce headers
$bounceurl = $vbulletin->options['ezb_admincpurl'] . "/ezbounce.php?u=" . userid;
$bouncestring = "<a href=\"$bounceurl\" target=\"_blank\">$bounceurl</a>";
$headers .= 'X-EZbouncer: ' . $bouncestring . $delimiter;

That gives me:

X-EZbouncer: <a href="/ezbounce.php?u=userid" target="_blank">/ezbounce.php?u=userid</a>

So the header is getting inserted properly but I need to know what variable GAZ is using to identify the user so it will correctly include that.

Morgan
08-31-2008, 11:21 PM
Sorry, haven't tried it so the most I can offer is what is already written in post four:
You'll need to check the GAZ mail function in the gaz_class_process.php file to see what, if any, variable containing the user ID is available and replace $userid with the GAZ user ID variable, if available, and if there is not such a variable, then you'd need to edit GAZ to add such a variable, and then use the added variable name in place of $userid in the modification code that is used in the plugin at the gaz_send_email_headers hook.