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

Error trying to use gmail smtp

Discussion in 'XenForo Questions and Support' started by Banana Pup, May 2, 2012.

  1. Banana Pup

    Banana Pup Well-Known Member

    I just found out my host limits mail to 100 per hour so I am trying to set up smtp to use gmail.

    Error I get trying to send. I tested only for admin usergroup and get this error even then.

    An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/testxf/public_html/library/Zend/Db/Statement/Mysqli.php on line 77
    1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
    5. Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 50
    6. XenForo_Error::unexpectedException() in XenForo/Application.php at line 295
    7. XenForo_Application::handleException()
    settings are in mail options:
    smtp.gmail.com port 587
    myusername@gmail.com my password
    Use TSL
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. Banana Pup

    Banana Pup Well-Known Member

    Oddly though it only happens using remote SMTP, PHP mail it is fine but I need a solution past that as I'm limited to 100 e-mail per hour. It also errors rather quickly like under 30 seconds, could that still be a timeout?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  5. Banana Pup

    Banana Pup Well-Known Member

    Thanks Jake, I will point the tech here as he is blaming it on xF and not the server. Recommending I upgrade to a better forum software like myBB or Simple Machines =)
     
  6. Banana Pup

    Banana Pup Well-Known Member

    Ok, they fixed that and after about a minute wait, it confirms it was sent to 1 user, which is correct as I am testing to admin primary group. Now the new issue is using both gmail and several other SMTP servers, no mail arrives to my inbox.

    gmail settings I have

    smtp.gmail.com use port 587
    username: my-username@gmail.com password
    encryption type: TSL
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  8. Banana Pup

    Banana Pup Well-Known Member

    Yeah I looked there, only thing that is there is from my vB import

    _vb.helpfulanswer' doesn't exist

    No SMTP errors.
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Then I assume the emails are being sent. But the only way to confirm this is to look at the mail logs. I'm not sure if smtp.gmail makes those logs available.

    It could also be a spam filter. Check your spam box.

    It could also be a problem on the receiving end. An easy way to eliminate that possibility is to send test emails to several different addresses to see if any of them show up.
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    As an aside, make sure this line does not exist in the library/config.php file:

    Code:
    $config['enableMail'] = 0;
    
    That will disable outgoing mail.
     
  11. Banana Pup

    Banana Pup Well-Known Member

    Nope only things in config are the db settings and $config['superAdmins'] = '1';

    The real stumper here is I have tried other STMP including my ISP, my work's and my friends VPS. All send out but nothing arrives to my ISP mail, my work address, my gmail, my domain mail or mac.com
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In that case you will have to track down the mail logs to see what is happening to the emails.
     
  13. CyclingTribe

    CyclingTribe Well-Known Member

    Set encryption to None and try it. Any good?
     
  14. Banana Pup

    Banana Pup Well-Known Member

    Gonna start looking for a new host.. These guys are just really bad. They can't find anything in the logs and insist my forum would perform much better if I "upgraded" to Simple Machine 2.0 forum /facepalm
     
  15. Kent

    Kent Active Member

    I'd just like to note that if you send many emails from Free GMail SMTP you'll likely get flagged for spam and your account closed.
     
  16. I was having the same problem. I contact my host, figured it out and hope it starts working any minute. . .

    Our problem was the domain was trying to get its emails on hostgators servers when it should have been looking at google's servers for email. Just updated this record and we should start getting emails in about 4-8 hours.

    Hope that helps,
    JohnnyB
     

Share This Page