diff --git a/test/phpmailerTest.php b/test/phpmailerTest.php index dcf6253a..356e027b 100644 --- a/test/phpmailerTest.php +++ b/test/phpmailerTest.php @@ -931,13 +931,15 @@ EOT; */ function test_MailSend() { - $this->Mail->Body = "Sending via mail()"; - $this->BuildBody(); - $subject = $this->Mail->Subject; + if (function_exists('mail')) { //Mail is disabled in Travis-CI, so check before trying to use it + $this->Mail->Body = "Sending via mail()"; + $this->BuildBody(); + $subject = $this->Mail->Subject; - $this->Mail->Subject = $subject . ": mail()"; - $this->Mail->IsMail(); - $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); + $this->Mail->Subject = $subject . ": mail()"; + $this->Mail->IsMail(); + $this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo); + } } /**