Advertisement
Guest User

Untitled

a guest
May 1st, 2017
600
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. $mail = new PHPMailer();
  2. $mail->IsSMTP(); // telling the class to use SMTP
  3. $mail->Host = "mail.accent.com.pl";
  4. $mail->SMTPAuth = true;
  5. $mail->Username = "dduniec";
  6. $mail->Password = "12TRBxse22";
  7. $mail->From = "dduniec@energomontaz-polnoc.com.pl";
  8. $mail->FromName = "Dawid Duniec";
  9.  
  10. $mail->CharSet = "windows-1250";
  11. $mail->IsHTML(false);
  12. //koniec konfiguracji
  13.  
  14.  
  15. //DO KOGO
  16. $mail->AddAddress("dduniec@energomontaz-polnoc.com.pl");
  17. //TEMAT
  18. $mail->Subject = "Bilingi od 11.09.2009 do 08.02.2010";
  19. //TREŚĆ
  20.  
  21. $body = file('body.txt');
  22. $body = implode("", $body);
  23. $mail->Body = $body;
  24. //ZAŁĄCZNIK
  25. $mail->AddAttachment("Rachunki/Bartnicki Zbigniew.xls");
  26. $mail->AddAttachment("Oswiadczenie.doc");
  27.  
  28. //pokazuje czy wyslalo
  29. if(!$mail->Send())
  30. {
  31. echo "Message was not sent";
  32. echo "Mailer Error: " . $mail->ErrorInfo;
  33. exit;
  34. }
  35.  
  36. echo "Message has been sent";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement