Smtp connect() Failes

I am trying to send emails through a web page and I’m getting an smtp connect() Failed error.
I am using phpMailer to do that.
I troubleshooted according to and everythings is okay.
I am also connecting through an email client and I can send emails without any issues.
I can also send emails through phpMailer using gmail SMTP with the same code I’ve pasted below, but not through Mail-in-a-box.

Any suggestions?


$mail = new PHPMailer(true);

$mail->IsSMTP(); // telling the class to use SMTP
try {
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = “tls”; // sets the prefix to the servier
$mail->Host = “”; // sets mail as the SMTP server
$mail->Port = 587; // set the SMTP port for the GMAIL server
$mail->Username = ""; // mail username
$mail->Password = “MyPassword”; // mail password