If you was not tried registering on ' . $httpname . ' just remove this email. Welcome to FreeHackQuest! Your login: '******' Your password: '******' (You must change it) Link: ' . $httpname . 'index.php '; $stmt_insert2 = $conn->prepare(' INSERT INTO email_delivery( to_email, subject, message, priority, status, dt ) VALUES ( ?, ?, ?, ?, ?, NOW()); '); $stmt_insert2->execute(array($email, $email_subject, $email_message, 'high', 'sending')); // $nick APIEvents::addPublicEvents($conn, 'users', 'New player {' . htmlspecialchars($nick) . '}. Welcome!'); $error = ''; // this option must be moved to db if (isset($config['mail']) && isset($config['mail']['allow']) && $config['mail']['allow'] == 'yes') { APIMail::send($config, $email, '', '', $email_subject, $email_message, $error); } $result['result'] = 'ok'; $result['data']['message'] = 'Check your your e-mail (also please check spam).'; echo json_encode($result);
<?php ini_set('error_reporting', E_ALL & ~E_NOTICE); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); exit; // include_once "../../config/config.php"; $curdir_test_mail = dirname(__FILE__); include_once $curdir_test_mail . "/../api.lib/api.mail.php"; include_once $curdir_test_mail . "/../../config/config.php"; if (!isset($_GET['email'])) { echo "not found parametr ?email="; exit; } $email = $_GET['email']; echo "To: " . $email . "<br>"; $subject = 'Test Mail'; echo "Subject: " . $subject . "<br>"; $body = 'Test Message'; echo 'Body: ' . $body . '<br>'; $error = ""; echo "try send email<br>"; // send($config, $to_, $cc_, $bcc_, $subject, $body, &$errormsg) APIMail::send($config, $email, '', '', $subject, $body, $error); echo "Sended<br>"; echo "Error: " . $error . '<br>';