Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z autoryzacją SMTP w direct admin
projektGraf
post
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 19.09.2009

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


Witam

Do wysyłania autoryzowanych wiadomości e-mail korzystam z gniazd (socket). Oto kodzik:

  1. // $server_smtp - nazwa serwera smtp
  2. // $login - login
  3. // $pass - hasło
  4. // $sender - nadawca
  5. // $receiver - odbiorca
  6. // $title - tytuł
  7. // $mailHtml - treść wiadomości
  8.  
  9. function sendMailHtml($server_smtp, $login, $pass, $sender, $receiver, $title, $mailHtml) {
  10. global $report;
  11.  
  12. $send = @fsockopen($server_smtp, 587, $errno, $errstr);
  13. $report = fgets($send,1024)."<br />";
  14.  
  15. fputs($send,"HELO $server_smtp\r\n");
  16. $report = fgets($send,1024)."<br />";
  17.  
  18. // autoryzacja SMTP
  19. fputs($send, "AUTH LOGIN\r\n");
  20. $report .= fgets($send,1024)."<br />";
  21.  
  22. fputs($send, base64_encode($login)."\r\n");
  23. fputs($send, base64_encode($pass)."\r\n");
  24. $report .= fgets($send,1024)."<br />";
  25.  
  26. fputs($send, "MAIL FROM: ".$sender."\r\n");
  27. $report .= fgets($send,1024)."<br />";
  28. fputs($send, "RCPT TO: ".$receiver."\r\n");
  29. $report .= fgets($send,1024)."<br />";
  30.  
  31. fputs($send, "DATA\r\n");
  32. fputs($send, "From: ".$sender."\r\n");
  33. fputs($send, "Date: ".date("d").' '.date("M").' '.date("y").' '.date('H:i')."\r\n");
  34. fputs($send, "Subject: ".$title."\r\n");
  35. fputs($send, "To: ".$receiver."\r\n");
  36. fputs($send, "MIME-Version: 1.0\r\n");
  37. fputs($send, "Content-type: text/html; charset=utf-8\r\n");
  38. fputs($send, "Content-Transfer-Encoding: 8bit;\r\n");
  39. fputs($send, "\r\n");
  40. fputs($send, strtr($mailHtml, "\xA5\x8C\x8F\xB9\x9C\x9F", "\xA1\xA6\xAC\xB1\xB6\xBC")."\r\n");
  41. $report .= fgets($send,1024)."<br />";
  42.  
  43. fputs($send, ".\r\n");
  44. fputs($send,"QUIT\r\n");
  45. $report .= fgets($send,1024)."<br />";
  46.  
  47. fclose($send);
  48.  
  49. }
  50.  


Sam skrypt działa z wyjątkiem 2 serwerów. linuxcom.pl i follownet.pl, na obydwuch jest directAdmin. Problem jest taki:
Konfiguruje skrypt na serwer SMTP w kei, wp, onet wiadomość od razu wychodzi.
Konfiguruje skrypt na serwer SMTP linuxcom.pl, follownet.pl wiadomość niby wyszła bo nie ma żadnych błędów, ale gdzieś ginie na serwerze.

Z otrzymanych logów serwera:
MTP protocol synchronization error (next input sent too soon: pipelining was not advertised): rejected "DATA"


2010-03-01 11:48:18 H=s02.follownet.pl (mail.eye.media.pl) [94.23.48.131]
incomplete transaction (sync failure) from <sklep@eye.media.pl>
2010-03-01 11:48:18 SMTP protocol synchronization error (next input sent too soon:
pipelining was not advertised): rejected "DATA" H=s02.follownet.pl
(mail.eye.media.pl) [94.23.48.131] next input="From: Automat systemowy
<sklep@eye.media.pl>\r\nDate: 01 Mar 10 11:48\r\nSubject: Aktywacja nowego
konta.\r\nTo: biuro@isp-media.pl\r\nMIME-Version: 1.0\r\nCont"


Tutaj znalazłem podpowiedź
http://www.exim.org/lurker/message/2005012...a2c15ae.en.html

Czy można prosić o pomoc aby skrypt działał i na tych dwóch serwerach korzystając z kont serwera, a nie zewnętrznych??

Pozdrawiam
I bardzo proszę o pomoc


Go to the top of the page
+Quote Post

Posty w temacie


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.08.2025 - 03:43