Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]PHPMailer - recipient address rejected
Mateushh
post
Post #1





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

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


Witam,

mam problem z PHPMailerem. Błąd:
Recipient address rejected: <mojadresemail@vp.pl> is not authorized to send messages from <fsadfdsa@o2.pl>

Przy gmailu wszystko pięknie działa, jednak z onet nie bardzo. E-mail oraz jego hasło są na bank poprawnie podane.

  1.  
  2. $name = strip_tags(trim($_POST["contact_id"]));
  3. $name = str_replace(array("\r","\n"),array(" "," "),$name);
  4. $emailsender = filter_var(trim($_POST["contact_email"]), FILTER_SANITIZE_EMAIL);
  5. $message = trim($_POST["contact_content"]);
  6.  
  7. $mail = new PHPMailer;
  8. $mail->CharSet = "UTF-8";
  9.  
  10. $mail->IsSMTP();
  11. $mail->SMTPDebug = 2;
  12. $mail->Host = "smtp.poczta.onet.pl";
  13. $mail->Port = 465;
  14. $mail->SMTPAuth = true;
  15. $mail->Username = "mojadresemail@vp.pl";
  16. $mail->Password = "mojehaslo";
  17. $mail->SMTPSecure = 'ssl';
  18.  
  19. $mail->From = $emailsender;
  20. $mail->FromName = $name; # Sender name
  21. $mail->Sender = $emailsender;
  22. $mail->AddReplyTo($emailsender, $name);
  23. $mail->AddAddress('mojadresemail@vp.pl', 'imie'); # # Recipient (e-mail address + name) / Odbiorca (adres e-mail i nazwa)
  24.  
  25. $mail->IsHTML(true); # Email @ HTML
  26. $mail->Subject = 'Nowa wiadomość od: '.$name;
  27.  
  28. $gridBody .= $message;
  29.  
  30. $mail->Body = nl2br($gridBody);
  31. $mail->AltBody = 'Wiadomość została niepoprawnie wysłana. Wystąpił błąd podczas jej wysyłania.';
  32.  
  33. $mail->Send();

Przy gmailu nie było tego problemu. Ktoś wie o co chodzi? (IMG:style_emoticons/default/snitch.gif)

Ten post edytował Mateushh 13.07.2015, 20:36:29
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
Pyton_000
post
Post #2





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

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


Widocznie Onet nie pozwala na wysłanie wiadomości nie ze swoich domen.
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: 25.12.2025 - 05:02