I was getting a MySQL timeout error when sending only - count it - 1 email via a Report Post form. Fixed it by replacing the
mail_send plugin. This edit also makes it possible to use this mod with no file edits:
Code:
if ($this->registry->options['usemailqueue'] AND get_class($this) == 'vB_Mail')
{
$qmail =& vB_QueueMail::fetch_instance();
$qmail->toemail = $this->toemail;
$qmail->subject = $this->subject;
$qmail->message = $this->message;
$qmail->headers = $this->headers;
$qmail->fromemail = $this->fromemail;
$qmail->delimiter = $this->delimiter;
$qmail->registry = $this->registry;
$qmail->debug = $this->debug;
$qmail->log = $this->log;
$qmail->send();
unset($qmail);
$this->toemail = '';
}
else
{
$delay = intval($vbulletin->options['cmqdelay']);
if ($delay > 0 AND $delay < 10)
{
sleep($delay);
}
}
Also create a plugin at hook
global_shutdown with the following code:
Code:
$vbulletin->mailqueue = null;