11

I have a Unix base server and a php base website on it. I am trying to set full name and email address for the sendmail_path in php.ini.
When I set it as below (without name) it works fine

sendmail_path = /usr/sbin/sendmail -t -i -f'emailaddress@example.com'

but if I try to add name as below it fails

sendmail_path = /usr/sbin/sendmail -t -i -f'"Full Name" <emailaddress@example.com>'

You may suggest to use sendmail_from instead but as I mentioned it's Unix server and whatever is set in sendmail_from will be ignored. Does anybody know how to fix this issue?

Any help will be appreciated in advance.

AnFi
  • 10,493
  • 3
  • 23
  • 47
Javad
  • 4,339
  • 3
  • 21
  • 36
  • Have you tried escaping the spaces between Full, Name and the e-mail by using a backslash + space (`\ `)? – Diamondo25 Apr 02 '14 at 15:33
  • I tried with `\\` before the double quotations but not for space, I will try it now – Javad Apr 02 '14 at 15:35
  • @Diamondo25 no it does not work; I tried `"Full\ Name"\ ` I tried `"Full+Name"+` but still does not work – Javad Apr 02 '14 at 15:43

1 Answers1

15

Try the version below:

sendmail_path = /usr/sbin/sendmail -t -i -F"Full Name" -f'emailaddress@example.com'

WARNINGS

  • It will work with "real sendmail" (sendmail provided by sendmail.org).
  • It may not work with some "sendmail look alike" provided by other MTAs e.g. postfix, exim, ...
  • "Sendmail by sendmail.org" by default adds "warning headers" when -f command line option is used.
AnFi
  • 10,493
  • 3
  • 23
  • 47
  • Thanks that works fine; I learned to enable full name we need to use `-F` and to enable email address we need to use `-f` – Javad Apr 02 '14 at 17:31