• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Server issue Email Settings/Error Message

Affected version
X2 Beta 2
#1
Hello Everyone,
Any suggestions on this error. I can use any email address and I still get a error?
I had tried to send a message to myself using the contact us in the footer. I think this did work in Beta 1 but not sure if I did test it or not. But did work in Version 1.5
I took out my email address in the message.

Code:
Swift_TransportException: Email to blank@idontknow.us failed: Unsupported sendmail command flags [/bin/true]. Must be one of "-bs" or "-t" but can include additional flags. src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php:146
Generated by: Rich Sep 14, 2017 at 2:34 PM

Stack trace

#0 /home/richvkal/public_html/xen/src/XF/Mail/Mailer.php(293): Swift_Transport_SendmailTransport->send(Object(Swift_Message), Array)
#1 /home/richvkal/public_html/xen/src/XF/Mail/Mail.php(261): XF\Mail\Mailer->send(Object(Swift_Message), Object(Swift_SendmailTransport))
#2 /home/richvkal/public_html/xen/src/XF/Service/Contact.php(144): XF\Mail\Mail->send()
#3 /home/richvkal/public_html/xen/src/XF/Pub/Controller/Misc.php(78): XF\Service\Contact->send()
#4 /home/richvkal/public_html/xen/src/XF/Mvc/Dispatcher.php(232): XF\Pub\Controller\Misc->actionContact(Object(XF\Mvc\ParameterBag))
#5 /home/richvkal/public_html/xen/src/XF/Mvc/Dispatcher.php(85): XF\Mvc\Dispatcher->dispatchClass('XF:Misc', 'Contact', 'json', Object(XF\Mvc\ParameterBag), '')
#6 /home/richvkal/public_html/xen/src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 /home/richvkal/public_html/xen/src/XF/App.php(1777): XF\Mvc\Dispatcher->run()
#8 /home/richvkal/public_html/xen/src/XF.php(320): XF\App->run()
#9 /home/richvkal/public_html/xen/index.php(13): XF::runApp('XF\\Pub\\App')

Request state

array(4) {
  ["url"] => string(13) "/misc/contact"
  ["referrer"] => string(24) "https://xen.richvkal.us/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(7) {
    ["subject"] => string(2) "hi"
    ["message"] => string(5) "hello"
    ["_xfRedirect"] => string(24) "https://xen.richvkal.us/"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
#3
Hello,
I would not know, could you tell me where I would get that information? I can do most things, but the technical about PHP, CSS and things like that I don't know anything.
 

Kirby

Well-known member
#8
/bin/true is an executable that just returns the exit code 0 (success), it's not a sendmail compatible MTA - hence it can't send emails :)
 
#10
Hello Kirby,
Don't know if you are still around or not, but wanted to give you a update on this situation. Apparently there is a issue like you said with the PHP send path, when I show the tech support people at my hosting provider, they asked me for my password for both my forums to get into the admin control panel, as it turns out, I also had this issue with my other forum with not getting the emails. I went and check on what they did with my email settings, they set up the SMTP so I can get my emails and it now works. But fail to get a answer as to why the PHP is not working. I have been with quite a few hosting providers, and never had a issue with the emails using the PHP, up until now. Having a few more issues with this hosting provider, but trying to get it work out.

Thanks again
 

Kirby

Well-known member
#11
In simple terms, a MTA (Mail Transfer Agent) is a program that does take email and delivers it "upstream".
sendmail is such a program, it's original version is very old (dating back to unix operating system from the 80s).
"Upstream" in case of sendmail is usually a local mailserver that queues the email to deliver it to the mailserver of the recipient.
Todays linux servers usually have sendmail-compatible programs provided by Mail-Server Software like Postfix or Exim.
PHP uses "sendmail" to send email via its built-in mail() function.
In order to do that, it needs to know where this program is located on the filesystem - this is where sendmail_path comes into play, it does tell PHP where to find the sendmail binary (eg. the executable program).
Your hosting provider has set this to /bin/true, which is not a "sendmail" but a simple program that does ... nothing, it just returns a so called "exit code" of 0, which does mean "success".
This setting is nonsense.
Why your Hosting provider does this is beyond my knowledge, maybe they want to avoid the hassle of properly setting up a email queuing on their servers.

(This description is not fully technically correct, but I hope it is understandable).
 
Last edited: