Hello.
I’m trying to fix it but i can’t. I run apache on arch linux with php 7. I’ve installed[URL=”https://wiki.archlinux.org/index.php/Sendmail#Installation”]sendmail smtp[B]php.ini
[CODE]
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = [email protected]
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).
; http://php.net/sendmail-path
sendmail_path = “/usr/sbin/sendmail -t -i”
; 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().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
This is the only line which I changed:
[CODE]
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).
; http://php.net/sendmail-path
sendmail_path = “/usr/sbin/sendmail -t -i”
When I try this code:
[CODE]<?php
mail(“[email protected]”, “Test”, “just a test”);
echo “Emailed sended successfully!”;
?>
The email never appears in my gmail.
If I upload the php file in a webhosting server the mail is getting received as expected.
I don’t get any log file in [B]/var/log/httpd[B]/var/log
What else can go wrong?
(I did not forgot to restart apache after configuring php.ini)
Thanks.