Advertisement
Guest User

Untitled

a guest
Nov 10th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php
  2. require_once('PHPMailerAutoload.php'); # patch where is PHPMailer / ścieżka do PHPMailera
  3.  
  4. $mail = new PHPMailer;
  5. $mail->CharSet = "UTF-8";
  6.  
  7. $mail->IsSMTP();
  8. $mail->Host = 'smtp.gmail.com'; # Gmail SMTP host
  9. $mail->Port = 465; # Gmail SMTP port
  10. $mail->SMTPAuth = true; # Enable SMTP authentication / Autoryzacja SMTP
  11. $mail->Username = "livemsg.kontakt@gmail.com"; # Gmail username (e-mail) / Nazwa użytkownika
  12. $mail->Password = "haslo"; # Gmail password / Hasło użytkownika
  13. $mail->SMTPSecure = 'ssl';
  14.  
  15. #$mail->From = ''; # REM: Gmail put Your e-mail here
  16. $mail->FromName = 'You name'; # Sender name
  17. $mail->AddAddress('jachimozo.biznes@gmail.com', 'Name'); # # Recipient (e-mail address + name) / Odbiorca (adres e-mail i nazwa)
  18.  
  19. $mail->IsHTML(true); # Email @ HTML
  20.  
  21. $mail->Subject = 'E-mail subject / Tytuł wiadomości';
  22. $mail->Body = 'HTML e-mail body / Treść wiadomości w HTML';
  23. $mail->AltBody = 'Plaint text e-mail body / Treść wiadomości jako tekst';
  24.  
  25. if(!$mail->Send()) {
  26. echo 'Some error... / Jakiś błąd...';
  27. echo 'Mailer Error: ' . $mail->ErrorInfo;
  28. exit;
  29. }
  30.  
  31. echo 'Message has been sent (OK) / Wiadomość wysłana (OK)';
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement