PDA

View Full Version : vbulletin bug ??


Delphiprogrammi
01-07-2006, 08:58 PM
hi people,

I'm verry sorry but i don't get this.I'm trying to send an email through a vbulletin hook.The hook is "report_send_email" and i have a setting in my modification wheter users want to receive the emails so first some checking is needed ......

if (!$vbulletin->options['postreports_enabled'] || ($vbulletin->options['postreports_enabled'] && $vbulletin->options['postreports_alsoemail']))
{
vbmail($moderator['email'], $subject, $message, true);
}


no errors at all but no emails either.my ideas are up....

Logician
01-07-2006, 09:16 PM
hi people,

I'm verry sorry but i don't get this.I'm trying to send an email through a vbulletin hook.The hook is "report_send_email" and i have a setting in my modification wheter users want to receive the emails so first some checking is needed ......

if (!$vbulletin->options['postreports_enabled'] || ($vbulletin->options['postreports_enabled'] && $vbulletin->options['postreports_alsoemail']))
{
vbmail($moderator['email'], $subject, $message, true);
}


no errors at all but no emails either.my ideas are up....

$subject and $message variables are empty when this hook runs. Populate them first:
eval(fetch_email_phrases('myemailphrases', $email_langid));

Delphiprogrammi
01-08-2006, 10:06 AM
$subject and $message variables are empty when this hook runs. Populate them first:
eval(fetch_email_phrases('myemailphrases', $email_langid));

did that before the vbmail() call result still the same no errors but no email either....

strange thing is if you make an obovious syntax error like an open "" or forget a { you get an error about this and the email is sended ..... while if the code is correct nothing is sended at all don't understand that "logic" i'll make this more clear with an example.This code


eval(fetch_email_phrases('reportbadpost',$email_la ngid);
vbmail($modoerator['email'],$subject,$message,true);


is according to PHP 's syntax not correct.A missing ")" but it perfectly sends the email while this


eval(fetch_email_phrases('reportbadpost',$email_la ngid));
vbmail($moderator['email'],$subject,$message,true);

is correct code but no emails are send.I just don't get it