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

Lack of Interest Allow us to specify multiple SMTP settings

Discussion in 'Closed Suggestions' started by Rigel Kentaurus, Oct 16, 2011.

  1. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    I am moving to using Google Apps for sending email.

    The reason for this is that I am tired of dealing with sendmail, spammers, and everything associated with it. When I am not dealing with security I am dealing with sendmail jumping to 60% CPU usage and other random scenarios. I give up being a mail server admin.

    Now, sending mail through SMTP with Google Apps is allowed, although it is restricted to 500 mails for the free accounts and 2000 for business. For a busy forum, 2000 is too little, and I easily exceed that limit.

    Google refuses to upgrade the limit, and the suggestion from them is sending the email from different accounts. It is valid to create a mailer1@mydomain.com account, mailer2@, mailer3@, etc and when I reach the limit from one account I could start sending the email from the other.

    While I do not expect XenForo to manage my email, it would be really useful if I could setup multiple SMTP accounts, and the mail system would just choose one at random, this would give me a reasonable distribution to avoid reaching the quota.
  2. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    Ok, I have additional suggestion to this

    If not several SMTP settings, would be nice to setup a separate one for
    • Account confirmations
    • Password recovery
    And another one for regular watched threads and conversations, in such a way that I can have different queues for sending password recovery
  3. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member


    Give me a hook on getPreparedMailHandler() or some way to extend the XenForo_Mail class so I can code it myself ;) with an addon

    Edit: doh, just saw the load_class_mail hook
  4. ragtek

    ragtek Guest

    Wouldn't it be here better:
        public static function getDefaultTransport()
    $options XenForo_Application::get('options');

    $transportOption $options->get('emailTransport'false);
            if (
    $transportOption['emailTransport'] == 'smtp')
    AND mail object is already returned via an factory method, so you're already able to overwriter what you want;)
  5. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    The problem with that method is that it is static

    Inheritance does not work for class methods :)

    I ended up overriding the sendMail() method to call my own setupTransport() method. It is working for me now, and I have a "pool" of email users to send from

    For the devs ... can those methods (the static ones) in Mail.php could be made into regular methods? It would help for inheritance :) If performance is the concern a singleton pattern could be used
  6. Deepmartini

    Deepmartini Well-Known Member

    Would you recommend using an external SMTP server service? What ones are good to look at? My concern is deliverability issues.
  7. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    I have had better success with an external SMTP server than with a local sendmail, depends on your level of traffic. I had more bounced emails with the local sendmail, since it did not have the private key dns authentication for emails, and some other things you can use to make sure it is not classified as spam.

    I don't have recommendations. I am using google business (up to 2000 emails per day), other recommendations are welcome.
  8. Deepmartini

    Deepmartini Well-Known Member

Share This Page