salve a tutti, sto configurando phpmailer per l'invio di email da [email protected], il dominio è abilitato per l'invio e la ricezione di email, infatti da un client di posta invio e riceve tranquillamente. I parametri che setto sono:
ricevo nella pagina dove chiamo questa funzione dei messaggi client->server, il testo dell'email e alla fine Message has been sent'. Il problema è che non mi arriva l'email. Qualcuno che ha avuto il mio stesso problema potrebbe aiutarmi gentilmente?
grazie
PHP:
$mail = new PHPMailer();
// Set mailer to use SMTP
$mail->isSMTP();
// SMTP server
$mail->Host = "nomehost";
$mail->SMTPDebug = 2;
// Enable SMTP authentication
$mail->SMTPAuth = true;
// SMTP username
$mail->Username = ' [email protected]';
// SMTP password
$mail->Password = 'xxxxxxxxxxxx';
$mail->SMTPSecure = 'ssl';
// TCP port to connect to
$mail->Port = 465;
$mail->SetFrom(' [email protected]', 'miosito');
// Name is optional
$mail->addAddress('[email protected]');
// Set email format to HTML
$mail->isHTML(true);
$mail->Subject = 'info';
$mail->Body = 'Questa è una prova <b>BENVENUTO!</b>';
//$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
ricevo nella pagina dove chiamo questa funzione dei messaggi client->server, il testo dell'email e alla fine Message has been sent'. Il problema è che non mi arriva l'email. Qualcuno che ha avuto il mio stesso problema potrebbe aiutarmi gentilmente?
grazie