Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Phpmailer smtp komunikaty
lord2105
post
Post #1





Grupa: Zarejestrowani
Postów: 380
Pomógł: 59
Dołączył: 24.04.2010
Skąd: London

Ostrzeżenie: (0%)
-----


Witajcie mam małe pytanko jak wyłączyć komunikaty o autoryzacji z smtp w phpmailer po wykonaniu metody Send(); otrzymuje wygenerowane przez klase komunikaty w stylu:


SMTP -> FROM SERVER:220 ************** ESMTP IdeaSmtpServer v0.70 ready.
SMTP -> FROM SERVER: 250-*************** Hello *****************, pleased to meet you 250-PIPELINING 250-ENHANCEDSTATUSCODES 250-SIZE 250-8BITMIME 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250 HELP
SMTP -> FROM SERVER:250 2.1.0 Sender address accepted
SMTP -> FROM SERVER:250 2.1.5 Recipient address accepted
SMTP -> FROM SERVER:354 Go ahead...
SMTP -> FROM SERVER:250 2.0.0 Message accepted.

* = moje ip i zdres smtp

kod wysyłający emaile:
  1. $mail = new PHPMailer(true);
  2.  
  3. $mail->IsSMTP();
  4.  
  5. $mail->Host = $ehost;
  6. $mail->SMTPDebug = 2;
  7. $mail->SMTPAuth = true;
  8. $mail->Host = $ehost;
  9. $mail->Port = 587;
  10. $mail->Username = $euser;
  11. $mail->Password = $epass;
  12. $mail->AddAddress($_POST['user_email'], $_POST['user_nickname']);
  13. $mail->SetFrom('**********', '********* - System'); $mail->Subject = 'Aktywacja nowego konta';
  14. $mail->MsgHTML($msg);
  15.  
  16. if(!$mail->Send()) {
  17. $mail->ErrorInfo;
  18. $mail->ClearAllRecipients();
  19. $mail->ClearReplyTos();
  20. } else {
  21. $mail->ClearAllRecipients();
  22. $mail->ClearReplyTos();
  23. $tpl -> assign('show_form_register',1);
  24. $tpl -> assign('congrat',"<div class='congrat'>Gratulacje Twoje konto zostało stworzone. Na adres <b>$_POST[user_email]</b> została wysłana wiadomość z linkiem aktywującym Twoje konto.</div> ");
  25. }

Go to the top of the page
+Quote Post
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 561
Pomógł: 6315
Dołączył: 27.12.2004




$mail->SMTPDebug = false;
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.12.2025 - 00:35