Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2. kvs_mail($email,$subject,$body,$headers)
  3. {
  4. // code your gmail logic here
  5. require_once 'libs/class.smtp.php';
  6. require_once 'libs/class.phpmailer.php';
  7.  
  8. $mail = new PHPMailer();
  9. $mail->isSMTP();
  10. $mail->SMTPSecure='tls';
  11. $mail->Host = $smtp_server;
  12. $mail->Port = 25;
  13. $mail->SMTPAuth = true;
  14. $mail->Username = $smtp_login;
  15. $mail->Password = $smtp_password;
  16. $mail->setFrom('alpha_one_x86@first-world.info', 'alpha_one_x86');
  17. $mail->addReplyTo('alpha_one_x86@first-world.info', 'alpha_one_x86');
  18. $mail->isHTML(false);
  19. $mail->addAddress($email,'');
  20. $mail->Subject = $subject;
  21. $mail->Body = $body;
  22. $mail->send();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement