ecco come ho creato il file smtp.php
codice:
$x_mailer = 'X-Mailer: PHP/' . phpversion();
$mail->Host = "smtps.aruba.it"; // SMTP server
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
$mail->SMTPSecure = ssl;
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "miousername"; // SMTP account username
$mail->Password = "miapassword"; // SMTP account password
$mail->addCustomHeader($x_mailer);$mail->CharSet = 'UTF-8';
Mentre nel file che invia l'email ho messo:
codice:
include("smtp.php"); //
$mail->ConfirmReadingTo = 'mioindirizzoemail';
$mail->AddAddress("$email_destinatario", "$cognome $nome");
$mail->SetFrom("miaemail", "Nome mia Azienda");
$mail->AddReplyTo("miaemail", "Nome mia azienda");
$mail->Subject = "Conferma Acquisto";
$mail->AltBody = "Per vedere questa email devi utilizzare un client abilitato ad aprire le email in html";
Manca qualcosa?