public function testBadSMTP() { $this->Mail->smtpConnect(); $smtp = $this->Mail->getSMTPInstance(); $this->assertFalse($smtp->mail("somewhere\nbad"), 'Bad SMTP command containing breaks accepted'); }
echo "[+] OK\n"; } } else { if ($debug) { echo "[-] Fail\n"; } } } } } } } } if ($smtp_ok) { echo "[+] get last msg: "; echo $mail->getSMTPInstance()->getLastReply(); echo "\n"; if ($debug) { echo "[+] smtp_ok\n"; echo "[+] Found \$ok_smtp_secure_value: {$task_config['secure']}\n"; echo "[+] Found \$ok_port_value: {$task_config['port']}\n"; echo "[+] Sent test ok to {$test_address}\n"; } } else { $smtp_ok = false; if ($debug) { echo "[!] smtp_fail\n"; echo "[ ] Trying php mail()\n"; } $mail->isMail(); $mail->Subject = 'Mail phpmail() test ' . curPageURL();