bruno911
New Pleskian
At first I wasn't able to send emails notifications from php as the port 25 for outgoing traffic was block - now that was solved by the provider.
However, I still not able to send emails. Thisd is the php script for testing:
<?php
$to = '[email protected]';//tried gmail but also emails without spam filters
$subject = 'the subject';
$message = 'hi bruno how are you?';
$headers = 'From: not.reply@externaldomain' . "\r\n" .
'Reply-To: not.reply@externaldomain' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))echo 'y'; else 'n';
and returns true.
On php.ini the sendmail_path is correct and port too:
I have deleted the file /var/log/maillog, so that I get fresh error messages. But there are no errors when I send the email.
I also checked the email queue and there are no records there.
I am attaching screenshot of mail server configuration from plesk.
However, I still not able to send emails. Thisd is the php script for testing:
<?php
$to = '[email protected]';//tried gmail but also emails without spam filters
$subject = 'the subject';
$message = 'hi bruno how are you?';
$headers = 'From: not.reply@externaldomain' . "\r\n" .
'Reply-To: not.reply@externaldomain' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))echo 'y'; else 'n';
On php.ini the sendmail_path is correct and port too:
[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(), even in safe mode.
;mail.force_extra_parameters =
; 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(), even in safe mode.
;mail.force_extra_parameters =
I have deleted the file /var/log/maillog, so that I get fresh error messages. But there are no errors when I send the email.
I also checked the email queue and there are no records there.
I am attaching screenshot of mail server configuration from plesk.