getSMTPInstance() public method

Override this function to load your own SMTP implementation
public getSMTPInstance ( ) : SMTP
return SMTP
Example #1
0
 public function testBadSMTP()
 {
     $this->Mail->smtpConnect();
     $smtp = $this->Mail->getSMTPInstance();
     $this->assertFalse($smtp->mail("somewhere\nbad"), 'Bad SMTP command containing breaks accepted');
 }
Example #2
0
                                 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();