Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- require("PHPMailer_5.2.4/class.phpmailer.php");
- $mail = new PHPMailer();
- $mail->IsSMTP(); // set mailer to use SMTP
- $mail->SMTPDebug = 1;
- $mail->SMTPAuth = true;
- $mail->SMTPSecure= "ssl"; // Used instead of TLS when only POP mail is selected
- $mail->From = "practicas8@soltel.es";
- $mail->FromName = "Rafa";
- $mail->Host = "smtp.serviciodecorreo.es"; // specif smtp server
- $mail->Port = 465; // Used instead of 587 when only POP mail is selected
- $mail->Username = "xxxxx@soltel.es"; // SMTP username
- $mail->Password = "xxxxx"; // SMTP password
- $mail->AddAddress("xxxx@soltel.es", "xxxx"); //replace myname and mypassword to yours
- $mail->AddReplyTo("xxxx@soltel.es", "Soltel2019");
- $mail->WordWrap = 50; // set word wrap
- //$mail->AddAttachment("c:\temp\js-bak.sql"); // add attachments
- //$mail->AddAttachment("c:/temp/11-10-00.zip");
- $mail->IsHTML(true); // establecer formato HTML
- $mail->Subject = 'test';
- $mail->Body = 'test';
- if($mail->Send()) {echo "Send mail successfully";}
- else {echo "Send mail fail";}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement