Lack of interest Allow us to specify multiple SMTP settings

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

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.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
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
 
Alternative:

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
 
Wouldn't it be here better:
PHP:
    public static function getDefaultTransport()
    {
        $options = XenForo_Application::get('options');

        $transportOption = $options->get('emailTransport', false);
        if ($transportOption['emailTransport'] == 'smtp')
        {
            return self::_getDefaultSmtpTransport($transportOption);
        }
        else
        {
            return self::_getDefaultSendmailTransport($transportOption);
        }
    }

AND mail object is already returned via an factory method, so you're already able to overwriter what you want;)
 
AND mail object is already returned via an factory method, so you're already able to overwriter what you want;)
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
 
Would you recommend using an external SMTP server service? What ones are good to look at? My concern is deliverability issues.
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.
 
Top Bottom