Commit fb42a376 authored by Marius Burkard's avatar Marius Burkard

- patch for mail lib improvement from previous commits

parent 0316d01e
...@@ -154,7 +154,7 @@ CREATE TABLE IF NOT EXISTS `addons` ( ...@@ -154,7 +154,7 @@ CREATE TABLE IF NOT EXISTS `addons` (
CREATE TABLE IF NOT EXISTS `sys_mailqueue` ( CREATE TABLE IF NOT EXISTS `sys_mailqueue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`from` varchar(255) NOT NULL DEFAULT '', `from_address` varchar(255) NOT NULL DEFAULT '',
`recipients` text NOT NULL, `recipients` text NOT NULL,
`mail_content` mediumblob NOT NULL, `mail_content` mediumblob NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
......
...@@ -1591,7 +1591,7 @@ CREATE TABLE `sys_log` ( ...@@ -1591,7 +1591,7 @@ CREATE TABLE `sys_log` (
CREATE TABLE IF NOT EXISTS `sys_mailqueue` ( CREATE TABLE IF NOT EXISTS `sys_mailqueue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`from` varchar(255) NOT NULL DEFAULT '', `from_address` varchar(255) NOT NULL DEFAULT '',
`recipients` text NOT NULL, `recipients` text NOT NULL,
`mail_content` mediumblob NOT NULL, `mail_content` mediumblob NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
......
...@@ -866,7 +866,7 @@ class ispcmail { ...@@ -866,7 +866,7 @@ class ispcmail {
// Send mail: // Send mail:
$id = $mail['id']; $id = $mail['id'];
$from = $mail['from']; $from = $mail['from_address'];
$recipients = explode("\n", $mail['recipients']); $recipients = explode("\n", $mail['recipients']);
$mail_content = $mail['mail_content']; $mail_content = $mail['mail_content'];
...@@ -914,7 +914,7 @@ class ispcmail { ...@@ -914,7 +914,7 @@ class ispcmail {
*/ */
private function add_to_queue($from, $recipients, $mail_content) { private function add_to_queue($from, $recipients, $mail_content) {
global $app; global $app;
$app->db->query('INSERT INTO `sys_mailqueue` (`from`, `recipients`, `mail_content`) VALUES (?,?,?)', $from, implode("\n", $recipients), $mail_content); $app->db->query('INSERT INTO `sys_mailqueue` (`from_address`, `recipients`, `mail_content`) VALUES (?,?,?)', $from, implode("\n", $recipients), $mail_content);
} }
/** /**
......
...@@ -862,7 +862,7 @@ class ispcmail { ...@@ -862,7 +862,7 @@ class ispcmail {
// Send mail: // Send mail:
$id = $mail['id']; $id = $mail['id'];
$from = $mail['from']; $from = $mail['from_address'];
$recipients = explode("\n", $mail['recipients']); $recipients = explode("\n", $mail['recipients']);
$mail_content = $mail['mail_content']; $mail_content = $mail['mail_content'];
...@@ -910,7 +910,7 @@ class ispcmail { ...@@ -910,7 +910,7 @@ class ispcmail {
*/ */
private function add_to_queue($from, $recipients, $mail_content) { private function add_to_queue($from, $recipients, $mail_content) {
global $app; global $app;
$app->db->query('INSERT INTO `sys_mailqueue` (`from`, `recipients`, `mail_content`) VALUES (?,?,?)', $from, implode("\n", $recipients), $mail_content); $app->db->query('INSERT INTO `sys_mailqueue` (`from_address`, `recipients`, `mail_content`) VALUES (?,?,?)', $from, implode("\n", $recipients), $mail_content);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment