R
R
RJs452014-10-10 11:32:55
linux
RJs45, 2014-10-10 11:32:55

How to set email sender name on the server?

Good day.
There is a dedicated server with a configuration:
Debian 7
Apache 2.2.22
PHP 5.4.4 Emails are sent
from php via sendmail.
Only here letters come from www-data. When sending letters from PHP to the from header, I feed "[email protected]", they still come from www-data.
The server hosts several sites. I would like each site to send mail from "its" name.
How to do it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RJs45, 2014-10-10
@RJs45

Thanks everyone for trying to help, problem solved.
Maybe it will come in handy for someone:
It was in the SSMTP settings
in /etc/ssmtp/ssmtp.conf
to specify FromLineOverride=YES

J
Jaty4, 2014-10-10
@Jaty4

Have you even tried reading the php documentation? apparently not.
php.net/manual/en/function.mail.php

W
WebSpider, 2014-10-10
@WebSpider

Extract from documentation:

The additional_parameters parameter can be used to pass additional flags as command line arguments to the program configured to send mail specified by the sendmail_path directive. For example, you can set the sender of an email when using sendmail with the -f option .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question