Salam dostlar.
PHP mail() function-u localhost-da istifadə etməyə çalışdım amma alınmadı. Yani diami olaraq error verir.
1-2 forumdan php.ini və sendmail.ini fayllarında dəyişiklik etmək lazımdi deyilir. Dəyişiklikdən sonra da yenə eyni error çıxır.
php.ini- faylım:
11 | ; For Unix only. You may supply arguments as well ( default : "sendmail -t -i" ). |
13 | sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t" |
15 | ; Force the addition of the specified parameters to be passed as extra parameters |
16 | ; to the sendmail binary. These parameters will always replace the value of |
17 | ; the 5th parameter to mail(), even in safe mode. |
18 | ;mail.force_extra_parameters = |
20 | ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename |
21 | mail.add_x_header = Off |
23 | ; Log all mail() calls including the full path of the script, line #, to address and headers |
24 | ;mail.log = "C:\xampp\apache\logs\php_mail.log" |
sendmail.ini faylım:
3 | ; you must change mail.mydomain.com to your smtp server, |
4 | ; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup) |
5 | ; emails delivered via IIS's pickup directory cause sendmail to |
6 | ; run quicker, but you won't get error messages back to the calling |
10 | ; smtp port (normally 25) |
15 | ; auto = use SSL for port 465, otherwise try to use TLS |
18 | ; none = never try to use SSL |
22 | ; the default domain for this server will be read from the registry |
23 | ; this will be appended to email addresses when one isn't provided |
24 | ; if you want to override the value in the registry, uncomment and modify |
26 | ;default_domain=mydomain.com |
28 | ; log smtp errors to error.log (defaults to same directory as sendmail.exe) |
29 | ; uncomment to enable logging |
31 | error_logfile=error.log |
33 | ; create debug log as debug.log (defaults to same directory as sendmail.exe) |
34 | ; uncomment to enable debugging |
36 | ;debug_logfile=debug.log |
38 | ; if your smtp server requires authentication, modify the following two lines |
43 | ; if your smtp server uses pop3 before smtp authentication, modify the |
44 | ; following three lines. do not enable unless it is required. |
50 | ; force the sender to always be the following email address |
51 | ; this will only affect the "MAIL FROM" command, it won't modify |
52 | ; the "From: " header of the message content |
56 | ; force the sender to always be the following email address |
57 | ; this will only affect the "RCTP TO" command, it won't modify |
58 | ; the "To: " header of the message content |
62 | ; sendmail will use your hostname and your default_domain in the ehlo/helo |
63 | ; smtp greeting. you can manually set the ehlo/helo name if required |
Hansı dəyişiklikləri etməliyəm? Təşəkkürlər
Verilmiş cavablar və yazılan şərhlər (1 cavab var)
4
Maili SMTP ilə göndərirsən, ona görə lazımi məlumatları konfiqurasiya faylında yazmalısan.
Əgər öz mail serverin varsa, onun məlumatlarını yaz, ya da hosting şirkətinin verdiyini mail serveri istifadə elə.
smtp_server=senin mail serverin İP-si veya adi
auth_username=SMTP user
auth_password=SMTP password
Sual verin
Cavab verin