Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function send_mail($email,$message,$subject)
- {
- require_once('mailer/class.phpmailer.php');
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPDebug = 0;
- $mail->Mailer = "smtp";
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = "ssl";
- $mail->Host = 'smtp.gmail.com';
- $mail->Port = 465;
- $mail->AddAddress($email);
- $mail->Username="micorreo";
- $mail->Password="micontraseña";
- $mail->SetFrom('micorreo@gmail.com','Coding Cage');
- $mail->AddReplyTo("micorreo@gmail.com","Coding Cage");
- $mail->Subject = $subject;
- $mail->MsgHTML($message);
- $mail->Send();
- if(!$mail->Send()) {
- echo "Error: " . $mail->ErrorInfo;
- } else {
- echo "Enviado!";
- }
- }
Add Comment
Please, Sign In to add comment