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

XF 1.4 email issue

Discussion in 'Troubleshooting and Problems' started by mountaindrifter, Jan 9, 2015.

  1. mountaindrifter

    mountaindrifter New Member

    Hello, I am in the process of switching to xenForo. So far I am happy with this software, but I have an issue sending email I just can't seem to workout. Essentially, I am unable to send email from xenForo to external email addresses. I am hoping somebody here might be able to point me in the right direction.

    Here is my setup and what I know so far:

    I have a webform in my website that is hosted on the same server as my xenForo install. The webform uses php's sendmail. I can send an email from this form to any of my emails immediately and without issue.

    I have vBulletin on the same server (which I am migrating from), and I can send emails to any of my email addresses without issue.

    When I attempt to send email from xenForo using the default setting, the emails fail to send to any external email address. Strangely, it is able to deliver mail to an email address on the same domain as xenForo.
    If it helps, my domain is hosted with one registar. The DNS is pointed to another provider's nameservers where the site is hosted. The mx records are pointed to google apps where the email for this domain is hosted.

    Here are the server logs from xenForo:

    Zend_Mail_Transport_Exception: Email to xxx@xxx.xxx failed: Unable to send mail. - library/Zend/Mail/Transport/Sendmail.php:137

    stack trace:
    #0 xxx/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
    #1 xxx/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
    #2 xxxt/library/XenForo/ControllerAdmin/User.php(1147): Zend_Mail->send(Object(Zend_Mail_Transport_Sendmail))
    #3 xxx/library/XenForo/ControllerAdmin/User.php(1052): XenForo_ControllerAdmin_User->_sendEmail(Array, Array, Object(Zend_Mail_Transport_Sendmail))
    #4 xxx/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_User->actionEmailSend()
    #5 xxx/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 xxx/admin.php(13): XenForo_FrontController->run()
    #7 {main}
    If somebody might be able to help I would be very grateful. Are any other logs or information that I can provide that might help? Thanks
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Which mail server?

    Admin CP -> Home -> Options -> Email Options -> Email Transport Method

    Some mail servers are sensitive to these options:

    Admin CP -> Home -> Options -> Email Options -> Default Email Address (I have seen some servers which like this to use the same domain name as your server)

    Admin CP -> Home -> Options -> Email Options -> Set return path with -f parameter
  3. mountaindrifter

    mountaindrifter New Member

    Jake, thanks for the reply!

    I have it set as default. I have tried setting with SMTP for testing, but despite ensuring proper settings I could not seem to get it to deliver emails to any any address. The only time a message will be delivered is when it is set as default and only to the default email.

    The email set as the default email address is the only email that xenForo will successfully send a email to.

    I have tried both with and without the -f parameter set without affect.
  4. mountaindrifter

    mountaindrifter New Member

    Just to clarify what I wrote in the OP...the vBulletin install and php webform (which are both sending emails correctly) are on the same server. In fact, they are on the same domain in the same website, just a directory over.
  5. Mike

    Mike XenForo Developer Staff Member

    Unfortunately PHP doesn't get any information about why the send didn't work -- it just takes the return code from the MTA and receives a success/failure response. Any more information about why it's failing would have to be found in your server's mail log. This is generally something you would need your host to look at because it is only root-accessible by default.
  6. mountaindrifter

    mountaindrifter New Member

    Thanks for the responses.

    I have resolved this issue, so I just wanted to return and update this thread for archival reasons in case somebody is searching a similar issue.

    I was in an online chat for 3 hours with my host. They seemed to have no idea how hosting works and was quite frustrating, but it is a very cheap host so I wasn't too surprised. Basically, it came down to them saying I can not use the php mail function since I have my email MX records pointing to google apps where my email for the domain hosted. This does not sit well with me since vbulletin, wordpress, and a php webform on the same website all work just fine. I do agree that the emails from xenforo are being rejected, but I still do not know what is different about Xenforo from those others making them get rejected. Mute point now I suppose.

    Regardless, my host told me the only option is to use SMTP to avoid those authentication issues. I was having trouble getting SMTP to work as well. Instead I setup a subdomain, pointed the MX records to my webhost server, and setup a email under this subdomain as a forwarder to my standard email address (in case anybody responds to it). By using this subdomain email address in the "from" field in Xenforo (using "default" transport), I can now send emails properly.

    Anyway. thanks for the help. This issue can now be considered solved.
  7. Martok

    Martok Well-Known Member

    This shouldn't be the case. I use Google Apps for email account I use on my website and the MX records point to that. Yet both at my previous and current Web hosts I'm using the php mail function to send emails from my site.

    Sounds like you may want to find another Web host.
    vbuser likes this.
  8. mountaindrifter

    mountaindrifter New Member

    I fully agree, Martok. The support people were so incompetent it was unbelievable really. I happened on to a years paid hosting for one of my small sites so I thought I would take advantage of it, but now I am starting to think free is not worth the hassle. Thinking of going to Digital Ocean or possibly A Small Orange...

Share This Page