![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 339 Pomógł: 12 Dołączył: 22.11.2008 Ostrzeżenie: (20%) ![]() ![]() |
siema
Jak mogę zrobić automatyczne powiadamianie mnie o tym, że ktoś dodał komentarz na stronie? Tylko nie gotowce (IMG:http://forum.php.pl/style_emoticons/default/haha.gif) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 339 Pomógł: 12 Dołączył: 22.11.2008 Ostrzeżenie: (20%) ![]() ![]() |
Próbowałem ale mi nie wyszło.... Z tąd brałem podpowiedzi: http://60free.ovh.org/pl/support/support_g...sPhpMailer.html ... Niesty nie działa... :
conf: Kod <? require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->PluginDir = "phpmailer/"; $mail->From = "powiadomienie_o_nowym_komentarzu@wp.pl"; //adres naszego konta $mail->FromName = "phpMailer tester";//nagłówek From $mail->Host = "smtp.wp.pl";//adres serwera SMTP $mail->Mailer = "smtp"; $mail->Username = "powiadomienie_o_nowym_komentarzu@wp.pl";//nazwa użytkownika $mail->Password = "*******";//nasze hasło do konta SMTP $mail->SMTPAuth = true; $mail->SetLanguage("en", "phpmailer/language/"); $mail->Subject = "Mail testowy";//temat maila // w zmienną $text_body wpisujemy treść maila $text_body = "Cześć, chyba phpMailer działa \n\n"; $text_body .= "Na zawsze Twój, \n"; $text_body .= "PHPMailer"; $mail->Body = $text_body; // adresatów dodajemy poprzez metode 'AddAddress' $mail->AddAddress("******@********","******"); if(!$mail->Send()) echo "There has been a mail error <br>"; echo $mail->ErrorInfo."<br>"; // Clear all addresses and attachments $mail->ClearAddresses(); $mail->ClearAttachments(); echo "mail sent <br>"; ?> PS. oto błąd: Kod There has been a mail error
SMTP Error: Could not connect to SMTP host. mail sent |
|
|
![]() ![]() |
![]() |
Aktualny czas: 25.09.2025 - 22:37 |