Ejemplo n.º 1
0
function generateNotMail($sub, $address, $body)
{
    $message = parseNotHTML($body);
    $to = $address;
    $headers = "Content-type: text/html; charset=iso-8859-1" . "\n";
    error_log("Sending mail to {$to} about {$sub}");
    mailx($to, $sub, $message, $headers);
}
Ejemplo n.º 2
0
                          $text = 'MSG '.$to['email'].' '.$text;
                          $to['email'] = '*****@*****.**';
                          $conn->message($to['email'], $text);
                  }*/
            }
            $conn->disconnect();
        } else {
            $text = 'Комментарий ' . SITE_URL . '/?id=' . $_REQUEST['id'] . ' 

        ' . $_REQUEST['comment_text'];
            include_once 'lib/mail_lib.php';
            // Считываем шаблон.
            $stor = new Storage();
            $stor = $stor->storType(TE_STORTYPE);
            $t = $stor->make('loot');
            $t->setProperty('suptitle', 'notice_tmpl');
            $t->get();
            $tmpl_data = $t->getProps();
            $tpl = $tmpl_data['suptext'];
            $user = $reg->get('hamster_info');
            foreach ($tos as $to) {
                if ($user['email'] != $to['email']) {
                    $mail = $tpl;
                    $mail = strtr($mail, array("{TO}" => trim($to['email']), "{TEXT}" => $text));
                    $mail = mailenc($mail);
                    mailx($mail);
                }
            }
        }
    }
}
Ejemplo n.º 3
0
function send_email_req($hamster)
{
    // шаблон
    $reg = Registry::instance();
    $stor = new Storage();
    $stor = $stor->storType(TE_STORTYPE);
    $t = $stor->make('loot');
    $t->setProperty('suptitle', 'notice_tmpl');
    $t->get();
    $tmpl_data = $t->getProps();
    $tpl = $tmpl_data['suptext'];
    $mail = $tpl;
    // текст
    $text = my_lang('regist_req') . '   
        ' . SITE_URL . '/window/profile?approve_id=' . $hamster['id'] . '&hash=' . $hamster['hash'];
    $mail = strtr($mail, array("{TO}" => trim($hamster['email']), "{TEXT}" => $text));
    // отправляем
    $mail = mailenc($mail);
    $res = mailx($mail);
    if ($res) {
        return true;
    }
    return false;
}