Portál AbcLinuxu, 5. května 2025 21:21
if(!$mail->Send()) { echo "Správa nebola zaslaná. Pre chybu: " . $mail->ErrorInfo; } else { echo "Správa úspešne odoslaná"; }Prečo mi vrácia stále truee aj keď sa email neodošle? Spustím skript z localhost a email sa neodošle žiadny sendmail tam není - ale podmienka mi vrati stále "Správa úspešne odoslaná"
Řešení dotazu:
mail
, u niz je v dokumentaci uvedeno nasledujici:
Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise. It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.PS: v te podmince ma byt:
!$mail->send()
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.