Autor Zpráva
Taps
Profil
prosím mohl by mi někdo poradit jak mám nastavit ini_set, aby se mi neobjevovalo chybové hlášení uvedené níže. k souboru php.ini nemám přístup

mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\EasyPHP 2.0b1\www\paja\zmena_hesla.php on line 158

nastavení mám takto
SMTP localhost
smtp_port 25
sendmail_from no value
uživatel
Profil *
Dejte zavináč před název funkce, nebude to křičet.
DoubleThink
Profil *
Dejte zavináč před název funkce, nebude to křičet.
Ale ani fungovat.

mail na localhostu (...) k souboru php.ini nemám přístup
Zvláštní.

Tvé nastavení php předpokládá, že na tvém PC, na portu 25, naslouchá SMTP server.
Pokud chceš jenom testovat, můžeš použít tento server.

Jinak nastav adresu SMTP serveru tvého providera. Třeba smtp.iol.cz.
Taps
Profil
DoubleThink
a musí to být dresa poskytovale nebo tam můžu dát i adresu emailového serveru. Pokud tam dám adresu toho serveru tak to nefunguje
nightfish
Profil
Taps
a musí to být dresa poskytovale nebo tam můžu dát i adresu emailového serveru. Pokud tam dám adresu toho serveru tak to nefunguje
musí tam být adresa SMTP serveru, který nevyžaduje SMTP autentizaci (přičemž někteří poskytovatelé internetové připojení omezují přístup na "cizí" SMTP servery)

další možností je třeba použít phpmailer (návod) - podporuje i SMTP servery s autentizací
Taps
Profil
nightfish
ale stejně i tam zadáváš smtp
orsic
Profil
základ je mít vše správně nastavené v php.ini a sendmail.ini - co se týče mail serverů tak mě to chodilo z localhostu v pohodě třeba na email.cz kdežto na google mail to třeba nechodilo ...

localhost->SMTP->mail.cz

skript :

<html>
<head>
<title>Odeslání zprávy</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
</head>
<body>
<?php
  $zprava = $_POST['zprava'];
  $email = 'xxx.xxx@email.cz';
  $vysledek = mail($email, 'Mail z WWW', $zprava, "From: Private-localhost"); 
  if ($vysledek)
    echo 'Zpráva byla úspěšně odeslána';
  else
    echo 'Zpráva nebyla odeslána, nastala chyba';
?>
</body>
</html>


php.ini (v adresáři php,pozor nezaměnit s php ini v jiném místě) - náhled :
[mail function]
; For Win32 only.
;SMTP = xxxx.xxxxxx.cz - tady to je mrtvý
;smtp_port = 25

; For Win32 only.
sendmail_from = xxx@email.cz
; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "D:\xampp\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =


tedy pouze řádek se sendmail_path a _from ,je aktivní ...

sendmail.ini náhled :

; configuration for my sendmail

; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail

[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.

;tady bude SMTP mého providera!
smtp_server=mail.xxx.cz

; smtp port (normally 25)

smtp_port=25

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

; default_domain=

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

;debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

; nezapomenout jmeno a heslo k SMTP u mého providera !
auth_username=xxxxxxxxx
auth_password=xxxx

; if your smtp server uses pop3 before smtp authentication, modify the 
; following three lines

; pop3_server=
; pop3_username=
; pop3_password=

; to force the sender to always be the following email address, uncomment and
; populate with a valid email address.  this will only affect the "MAIL FROM"
; command, it won't modify the "From: " header of the message content

; force_sender=

; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting.  you can manually set the ehlo/helo name if required

; hostname=


nezapomenout username a heslo přístupu na SMTP !
__________________________________________
ale tohle je jenom jeden z mnoha způsobů nastavení,tak to neberte jako směrodatné,nicméně mě to takhle funguje no problemo :)
Portajk
Profil *
čaz orsic zkusil jsem to co jsi tady popisoval, a pořád mě to hlásí

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in ..... ......

kdyby to bylo v zabezpečení toho serveru tak by to snad hodilo

Warning: mail() [function.mail]: Failed to connect to mailserver at "xxxx.xxxxx.xxx" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in ..... ......

Nebo já už nevím co tomu vadí :) .. Kdyby měl někdo nákej nápad určitě to sem postněte diky

Vaše odpověď

Mohlo by se hodit

Odkud se sem odkazuje


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0