Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = new PHPMailer();
- $mail->IsSMTP(); // telling the class to use SMTP
- $mail->Host = "mail.accent.com.pl";
- $mail->SMTPAuth = true;
- $mail->Username = "dduniec";
- $mail->Password = "12TRBxse22";
- $mail->From = "dduniec@energomontaz-polnoc.com.pl";
- $mail->FromName = "Dawid Duniec";
- $mail->CharSet = "windows-1250";
- $mail->IsHTML(false);
- //koniec konfiguracji
- //DO KOGO
- $mail->AddAddress("dduniec@energomontaz-polnoc.com.pl");
- //TEMAT
- $mail->Subject = "Bilingi od 11.09.2009 do 08.02.2010";
- //TREŚĆ
- $body = file('body.txt');
- $body = implode("", $body);
- $mail->Body = $body;
- //ZAŁĄCZNIK
- $mail->AddAttachment("Rachunki/Bartnicki Zbigniew.xls");
- $mail->AddAttachment("Oswiadczenie.doc");
- //pokazuje czy wyslalo
- if(!$mail->Send())
- {
- echo "Message was not sent";
- echo "Mailer Error: " . $mail->ErrorInfo;
- exit;
- }
- echo "Message has been sent";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement