?
Referenced as Pull Request for: # 10342
avatar baijianpeng
baijianpeng
21 Apr 2016

Steps to reproduce the issue

Enter backed Global Configuration of Joomla 3.5.1, Server Tab, Email Settings:

Choose "Sendmail" as the email method.

Since I use XAMPP for Windows as localhost testing server, I input the real path of sendmail.exe to the "Sendmail path" field:

D:/xampp/sendmail/sendmail.exe

Fill other fields of email settings. Then click on the "Send test email " button.

Expected result

I hope it will successfully send out the testing email.

Actual result

No, no email sent out, I got following error message:

Could not execute: /usr/sbin/sendmail

System information (as much as possible)

Joomla 3.5.1
PHP 7
XAMPP for windows
Windows 10 64-bit

Additional comments

I just wonder: why the error message tell me a different path of sendmail while I had already fill that field with another real path?

avatar baijianpeng baijianpeng - open - 21 Apr 2016
avatar brianteeman brianteeman - change - 21 Apr 2016
Category Libraries
avatar brianteeman brianteeman - change - 22 Apr 2016
Labels Added: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 23 Apr 2016

i think the problem is joomla doesn't pass the sendmail conf var to phpmailer.

maybe after https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/factory.php#L685 adding this line:

$mail->set('Sendmail', $conf->get('sendmail', '/usr/sbin/sendmail'));
avatar sovainfo
sovainfo - comment - 6 May 2016

@baijianpeng Configure sendmail_path in php.ini and phpmailer will respect it, provided it contains the word sendmail. Currently it doesn't mention sendmail in it which is why it defaults to /usr/sbin/sendmail.

avatar baijianpeng
baijianpeng - comment - 6 May 2016

If Joomla only read sendmail path from php.ini, why show an input box for this parameter in "Global Configuration"?

avatar sovainfo
sovainfo - comment - 6 May 2016

Not saying Joomla only reads from php.ini, just answering your question. Agree with the solution proposed by @andrepereiradasilva
Joomla fails to communicate to phpmailer the path to the sendmail.
phpmailer stupidly enough only accepts a path from php.ini sendmail_path that requires the word sendmail in it. It defaults to /usr/sbin/sendmail otherwise.

avatar mbabker
mbabker - comment - 8 May 2016

See #10342

avatar mbabker mbabker - change - 8 May 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-05-08 20:01:10
Closed_By mbabker
avatar mbabker mbabker - close - 8 May 2016

Add a Comment

Login with GitHub to post a comment