Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Serwer home lub nazwa ustawiniea smtp w swiftmailer
borpaw
post 27.09.2015, 07:45:33
Post #1





Grupa: Zarejestrowani
Postów: 439
Pomógł: 0
Dołączył: 3.06.2010

Ostrzeżenie: (50%)
XXX--


Witam

czy ktoś może walczył z wysyłaniem email przez serwer smtp na home.pl lub nazwa.pl?

Używam php swiftmailer'a, poniżej adresy wpisałem fikcyjne. Na prawdziwych adresach dostaje komunikat:

  1. Uncaught exception 'Swift_TransportException' with message 'Expected response code 354 but got code "530", with message "530 5.7.0 No auth during mail transaction


Tyle, że konto którego używam istnieje i działa np: na outlook, jeśli w ten skrypt wpisze np server onetu wszystko jest ok, także skrypt też jest dobry tyle że nie na home.pl

  1. require_once 'vendor/swiftmailer/swiftmailer/lib/swift_required.php';
  2.  
  3. $transport = Swift_SmtpTransport::newInstance('smtp.home.pl', 587, 'tls')
  4. ->setUsername('test@test.pl')
  5. ->setPassword('*****')
  6. ->setAuthMode('login');
  7.  
  8. try {
  9. $mailer = Swift_Mailer::newInstance($transport);
  10. } catch (Swift_TransportException $exception) {
  11. var_dump($exception);
  12. }
  13.  
  14. $message = Swift_Message::newInstance()
  15. ->setSubject('Albo tak' . time())
  16. ->setFrom(array('test@test.pl' => 'Spotkanie firmowe' . time()))
  17. ->setTo(array('jakisadres@onet.pl'))
  18. ->setBody('jakas tresc')
  19. ;
  20.  
  21. echo "<br>";
  22.  
  23. if ($recipients = $mailer->send($message, $failures)) {
  24. print_r($failures);
  25. echo 'Message successfully sent!';
  26. } else {
  27. echo "There was an error:\n";
  28. print_r($failures);
  29. }
Go to the top of the page
+Quote Post
Pyton_000
post 27.09.2015, 07:53:23
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


Login i hasło na pewno ok? Takimi samymi możesz się zalogować np. przez thunderbird/outlook?
Go to the top of the page
+Quote Post
borpaw
post 27.09.2015, 08:06:52
Post #3





Grupa: Zarejestrowani
Postów: 439
Pomógł: 0
Dołączył: 3.06.2010

Ostrzeżenie: (50%)
XXX--


tak, napewno konto działa
Go to the top of the page
+Quote Post
askalon
post 20.06.2016, 09:59:38
Post #4





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 30.12.2014

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


Mam dokładnie ten sam problem. Czy może udało się komuś znaleźć rozwiązanie?
Go to the top of the page
+Quote Post
LowiczakPL
post 20.06.2016, 10:21:50
Post #5





Grupa: Zarejestrowani
Postów: 531
Pomógł: 55
Dołączył: 3.01.2016
Skąd: Łowicz

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


A próbowałeś zamiast 'smtp.home.pl' wpisać 'test.pl' czyli Twoją domenę od e-maila ?

i pokombinuj w wyłączonym TLSem

$transport = Swift_SmtpTransport::newInstance('test.pl', 587, '')

Ten post edytował LowiczakPL 20.06.2016, 10:24:31


--------------------
Szukam zleceń Symfony, Laravel, Back-End, Front-End, PHP, MySQL ...
Go to the top of the page
+Quote Post
askalon
post 20.06.2016, 11:10:18
Post #6





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 30.12.2014

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


@LowiczakPL: napisałem, że mam dokładnie ten sam problem - czyli z smtp.home.pl, portem 587 i TLS-em.
Go to the top of the page
+Quote Post
Pyton_000
post 20.06.2016, 11:38:07
Post #7





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


@askalon czytać umiesz?
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 15.05.2025 - 10:43