Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> phpMailer, problem z wysyłaniem maila
pawel349
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 13.12.2012

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


Witam wszystkich chciałem skonfigurować phpMailer żebym mógł wysyłać maile z localhosta i tutaj natrafiam na problem mam kod który zamieszam poniżej i przy odpalania mam błąd: "Następujący adres Nadawcy jest jest nieprawidłowy: pawel349@gmail.com" przejrzałem bardzo dużą liczbę artykułów jednak nic nie pomaga.
  1. require_once ("phpmailer/class.phpmailer.php");
  2.  
  3. $mail = new PHPMailer();
  4.  
  5. $mail->PluginDir = "phpmailer/";
  6. $mail->Mailer = "smtp";
  7. $mail->Host = "ssl://smtp.gmail.com";
  8.  
  9. $mail->SmTPAuth = TRUE;
  10. $mail->Username = "pawel349@gmail.com";
  11. $mail->Password = "*****";
  12. $mail->SetLanguage("pl", "phpmailer/language/");
  13. $mail->ContentType = "text/html";
  14.  
  15. $mail->From = "pawel349@gmail.com";
  16. $mail->FromName = "Paweł";
  17. $mail->Subject = "Test wiadomości";
  18. $mail->Body="Treśc przykładowego maila";
  19. $mail->AddAddress("pawel349cz@gmail.com");
  20.  
  21.  
  22. if($mail->Send())
  23. echo "Wiadomość została wysłana";
  24. else
  25. echo $mail->ErrorInfo;
  26.  
  27. $mail->SmtpClose();
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 8)
memory
post
Post #2





Grupa: Zarejestrowani
Postów: 616
Pomógł: 84
Dołączył: 29.11.2006
Skąd: bełchatów

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


  1. $mail->SMTPAuth = true;
  2. $mail->SMTPSecure = "ssl";
  3. $mail->Host ="smtp.gmail.com";
  4. $mail->Port = 465;


Ten post edytował memory 13.12.2012, 22:00:55
Go to the top of the page
+Quote Post
pawel349
post
Post #3





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 13.12.2012

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


Dalej jest problem "Następujący adres Nadawcy jest jest nieprawidłowy: pawel349@gmail.com".
Go to the top of the page
+Quote Post
memory
post
Post #4





Grupa: Zarejestrowani
Postów: 616
Pomógł: 84
Dołączył: 29.11.2006
Skąd: bełchatów

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


pawel349cz@gmail.com czy pawel349@gmail.com może tutaj jest problem . Dorzuć $mail->SMTPDebug = true i wrzuć log na forum
Go to the top of the page
+Quote Post
pawel349
post
Post #5





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 13.12.2012

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


SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (120834305)

Taki log dostałem

a co do maili to jeden jest do wysyłania a drugi do odbioru i są to dwa różne maile

Ten post edytował pawel349 13.12.2012, 22:14:04
Go to the top of the page
+Quote Post
memory
post
Post #6





Grupa: Zarejestrowani
Postów: 616
Pomógł: 84
Dołączył: 29.11.2006
Skąd: bełchatów

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


musisz do serwera dołączyć OpenSSL . phpinfo() i sprawdz czy jest enabled
Go to the top of the page
+Quote Post
pawel349
post
Post #7





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 13.12.2012

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


nie wiem czy o to chodzi ale po wywołaniu phpinfo() mam SSL Support - enable
Go to the top of the page
+Quote Post
memory
post
Post #8





Grupa: Zarejestrowani
Postów: 616
Pomógł: 84
Dołączył: 29.11.2006
Skąd: bełchatów

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


https://www.payfast.co.za/developers/_media...ssl_enabled.png
Jak masz takie coś to znaczy że jest włączony.
Go to the top of the page
+Quote Post
pawel349
post
Post #9





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 13.12.2012

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


ok rozwiązane

Ten post edytował pawel349 14.12.2012, 18:55:21
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 Aktualny czas: 21.08.2025 - 08:14