ciao!
io non uso credenziali per mandare email da aruba tramite phpmailer.
ti posto quello che uso io:
Codice PHP:
<?php
require_once 'class.phpmailer.php';
class Email {
private $email;
public function __construct() {
$this->email = new PHPMailer(TRUE);
$this->email->CharSet = 'UTF-8';
}
public function sendClassic($from, $fromName, $subject, $message, $arrayTo, $arrayBcc = NULL, $attach = NULL) {
try {
$this->emai->From = $from;
$this->email->FromName = $fromName;
$this->email->Subject = $subject;
$this->email->MsgHTML($message);
foreach ($arrayTo as $t) {
$this->email->AddAddress($t);
}
if ($arrayBcc != NULL) {
foreach ($arrayBcc as $b) {
$this->email->AddBCC($b);
}
}
if ($attach != NULL) {
$this->email->AddAttachment($attach);
}
$this->email->Send();
return '<p>EMAIL INVIATA</p>';
} catch (phpmailerException $e) {
return '<p class="error">' . $e->getMessage() . '</p>';
die();
}
}
}
hai un motivo per cui usi l'smtp?
sennò vedi se può fare al caso tuo.