Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "phpmailer/class.phpmailer.php";
- $mail = new PHPMailer(true);
- // allungo il tempo di post
- set_time_limit(3600);
- try {
- // allungo il tempo di post
- set_time_limit(30);
- // 'Email inviata correttamente';
- $mail->IsSMTP(); // set mailer to use SMTP
- $mail->SMTPAuth = true;
- $mail->From = "ilmio_1976@libero.it";
- $mail->FromName = "Nome di chi invia";
- $mail->Host = "smtp.libero.it"; // specify main and backup server
- $mail->Port = 465; // Porta SMTP
- $mail->Username = "ilmio_1976@libero.it"; // SMTP account username
- $mail->Password = "ammaccabanan3"; // SMTP account password
- $mail->AddAddress("$email", "INVIO"); // name is optional
- $mail->AddAddress("info@xxxxxx.it", "TEST"); // name is optional
- $mail->AddReplyTo("info@xxxxx.it", "");
- $mail->WordWrap = 50; // set word wrap
- $mail->IsHTML(true); // set email format to HTML
- $mail->Subject = "Oggetto email";
- $mail->Body = "questo e il corpo della email";
- # }
- $mail->Send();
- }
- catch (phpmailerException $e)
- {
- echo "<SCRIPT LANGUAGE='JavaScript'>";
- echo "alert (\"ERRORE INVIO E-MAIL $e !\");";
- echo "window.location.href=\"index.php\"";
- echo "</SCRIPT>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement