Hello all,
If i send message from php to user who enabled autoresponder, vacation message goes not to email defined in headers, but to system email php send mail from like apache@hostname.com or www-data@servername.com
Here is a code iam using to send message:
<?php
$message = 'test';
$headers = 'MIME-Version: 1.0'.PHP_EOL;
$headers .= 'Content-type: text/plain; charset=windows-1257'.PHP_EOL;
$headers .= 'From: test <user@domain.com>'.PHP_EOL;
$headers .= 'Return-Path: user@domain.com'.PHP_EOL;
mail('otheruser@otherdomain.com','test',$message,$headers);
?>
As you see from headers, vacation message should be sended to user@domain.com, but in logs i see what it goes to apache@servername.com
Any thoughts?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cant fix it, php script is in hosting company.
If i use old vacation script version 3.2 everything is working fine. But if i update to 4.0, i get these problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
If i send message from php to user who enabled autoresponder, vacation message goes not to email defined in headers, but to system email php send mail from like apache@hostname.com or www-data@servername.com
Here is a code iam using to send message:
<?php
$message = 'test';
$headers = 'MIME-Version: 1.0'.PHP_EOL;
$headers .= 'Content-type: text/plain; charset=windows-1257'.PHP_EOL;
$headers .= 'From: test <user@domain.com>'.PHP_EOL;
$headers .= 'Return-Path: user@domain.com'.PHP_EOL;
mail('otheruser@otherdomain.com','test',$message,$headers);
?>
As you see from headers, vacation message should be sended to user@domain.com, but in logs i see what it goes to apache@servername.com
Any thoughts?
Thanks.
Fix your PHP/Apache setup !
In your Apache site config, put something like this :
It also means you/your users will get bounce messages as well, instead of them being sent to the Apache user.
I cant fix it, php script is in hosting company.
If i use old vacation script version 3.2 everything is working fine. But if i update to 4.0, i get these problems.
ANd what if i want to send email with php from two or more different emails? Your fix is for only one email.