Autor | Zpráva | ||
---|---|---|---|
opsidiam Profil |
dobry den
mam problem s phpmailerom, v kuse mi ukazuje Nastala chyba: SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting , nech dam akekolvek SMTP
require_once 'mail/PHPMailerAutoload.php'; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->isHTML(true); $mail->SMTPAuth = true; $mail->Host = "smtp-pulse.com"; $mail->Port = "465"; $mail->Username = "###"; $mail->Password = "###"; $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>'.$_POST['editor1'].'<table><tr><td><table align="center" border="0" cellpadding="0" cellspacing="0" style="font-size: 11px;" width="600"><tbody><tr><td align="left" valign="top"><p>Copyright © 2015 Mailer.sk<br />All rights reserved.</p></td><td align="right" valign="top"><p><a href="http://mailer.e-crafting.eu/odhlas.php?&unsubscribe='.$row2["mail"].'&uid='.$id.'">Unsubscribe</a></p></td></tr></tbody></table></td></tr></tbody></table></body></html>'; $mail->From = "noreply@e-mailer.sk"; $mail->FromName = "E-Mailer"; $mail->Subject = "Subjekt"; $mail->MsgHTML($message); $mail->addReplyTo($row2["k_mail"], 'Odpovede'); if(isset($_POST["to"])){ $mail->addAddress($_POST["to"], "Mne"); } if(!$mail->Send()) { echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>Správa nebola zaslaná. <p></div>"; echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>Nastala chyba: " . $mail->ErrorInfo."</div>"; exit; }else{echo "OK";} prosim poradte mi , neviem si uz vôbec pomôct :( Moderátor juriad: Odmazáno jméno a heslo
|
||
juriad Profil |
#2 · Zasláno: 4. 4. 2016, 17:52:41
Co se ukáže na výstupu, pokud přidáš toto:
$mail->SMTPDebug = 2; $mail->Debugoutput = 'html'; Četl jsi si vůbec tu stránku Troubleshooting? |
||
opsidiam Profil |
#3 · Zasláno: 4. 4. 2016, 18:06:16
SMTP ERROR: Failed to connect to server: Connection timed out (110)
SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Nastala chyba: SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting |
||
juriad Profil |
Přidej řádku:
$mail->SMTPSecure = "ssl"; Pokud to nepomůže, je možné, že tvůj hosting blokuje odchozí komunikaci na portu 465. Jaký máš hosting, nepíšou o tom něco v nápovědě? sendpulse.com je nějaká podivná služba, když nenabízí port 587. Co jsem koukal tak nabízejí své vlastní API pro odesílání mailů; nepodařilo se mi najít, že by s jejich SMTP serverem někdo používal PHPMailer. |
||
opsidiam Profil |
#5 · Zasláno: 4. 4. 2016, 20:38:56
teraz mi ukazuje toto
SERVER -> CLIENT: 220 wes1-so2.wedos.net ESMTP Postfix - S.T.A.N.D.A. postak OUT CLIENT -> SERVER: EHLO mailer.e-crafting.eu SERVER -> CLIENT: 250-wes1-so2.wedos.net250-PIPELINING250-SIZE 104857600250-VRFY250-ETRN250-AUTH PLAIN LOGIN250-ENHANCEDSTATUSCODES250-8BITMIME250 DSN CLIENT -> SERVER: AUTH LOGIN SERVER -> CLIENT: 334 VXNlcm5hbWU6 CLIENT -> SERVER: bWFpbGVyQGUtY3JhZnRpbmcuZXU= SERVER -> CLIENT: 334 UGFzc3dvcmQ6 CLIENT -> SERVER: NEc0NTZkZXMu SERVER -> CLIENT: 235 2.7.0 Authentication successful CLIENT -> SERVER: MAIL FROM:<noreply@e-mailer.sk> SERVER -> CLIENT: 250 2.1.0 Ok CLIENT -> SERVER: RCPT TO:<opsidiam@gmail.com> SERVER -> CLIENT: 553 5.7.1 <noreply@e-mailer.sk>: Sender address rejected: not owned by user mailer@e-crafting.eu SMTP ERROR: RCPT TO command failed: 553 5.7.1 <noreply@e-mailer.sk>: Sender address rejected: not owned by user mailer@e-crafting.eu CLIENT -> SERVER: QUIT SERVER -> CLIENT: 221 2.0.0 Bye SMTP Error: The following recipients failed: opsidiam@gmail.com: <noreply@e-mailer.sk>: Sender address rejected: not owned by user mailer@e-crafting.eu Nastala chyba: SMTP Error: The following recipients failed: opsidiam@gmail.com: : Sender address rejected: not owned by user mailer@e-crafting.eu |
||
juriad Profil |
#6 · Zasláno: 4. 4. 2016, 23:55:07
sendpulse.com není obyčejný SMTP, ale služba na hromadné rozesílání mailů (?). Říká ti, že nesmíš poslat mail na opsidiam@gmail.com, protože není vlastněn uživatelem mailer@e-crafting.eu. Musíš tedy jít do konfigurace a tam jej přidat. Jak přesně to uděláš, netuším.
|
||
Davex Profil |
#7 · Zasláno: 5. 4. 2016, 19:06:50
opsidiam:
„ 553 5.7.1 <noreply@e-mailer.sk>: Sender address rejected: not owned by user mailer@e-crafting.eu “
Ta chyba říká, že uživatel mailer@e-crafting.eu není oprávněn odesílat e-maily jako odesílatel noreply@e-mailer.sk. |
||
Justýna Profil |
#8 · Zasláno: 6. 4. 2016, 16:29:46
opsidiam:
Změň si heslo k emailu mailer@e-crafting.eu, než ti přes něj někdo začne rozesílat spam. |
||
Časová prodleva: 9 let
|
0