Cron based e-mail sending

本帖由 binkuang2010-10-01 发布。版面名称:vBulletin 4.0.X 英文插件

  1. binkuang

    binkuang 正式会员

    vBulletin 4.0 Version

    In default vBulletin, if you send a large number of e-mails, vbulletin either puts them in it's queue and attempts to send them as each user visits a page, or just simply tries to send them straight away (as is the case when you use the Administrators email users inteface).

    The result of this can be that your server can gets seriously overloaded very quickly - or on many hosts, you get banned for exceeding their e-mail sending limits. This can make sending several thousand e-mails (like a newsletter) very difficult.

    This modification helps in three ways ;

    1. The processing of the mail queue is set-up as a vbulletin cron item.

    2. You can add a small delay before each e-mail is sent (0,1,2 or 5 seconds).

    3. E-mails from the ACP inteface are sent to the mail queue, not straight to the mail system.

    Use option 2 carefully, otherwise you will slow your e-mail system right down.

    For this to work, you must use e-mail queuing (ACP Options - Use Mailqueue System = Yes) and also the 'Number of Emails to Send Per Batch' needs to be a realistic value (see below). The installation process will attempt to set these options for you. This modification also requires two file edits to work correctly.

    There are two options for the cron job, you can either set it to run every minute, and set the items to be processed to something small (like 10), or you can do what this modification does by default and set it to run every 10 minutes, and set the items to be processed to something larger (like 80, which is the default).

    Remember, 10 e-mails per minute = 600 per hour while 80 e-mails every 10 minutes is 480 per hour. The numbers you set really depend on how quick you want large queues processed, and how much your mail server can handle in one go. The default settings are fine for most people.

    Once working, when using the ACP mail users inteface, remember you can set it to process 9999 at once (not 500) as the mails will now go into the queue, not be sent directly.

    Note: This modification will only affect queued e-mails such as subscription e-mails. It will not affect registration e-mails as they always bypass queuing.
     

    附件文件:

    已获得 Xiao.T(删除的会员) 的点赞。
  2. imku

    imku 普通会员

    thanku
     
正在加载...
相似主题 - Cron based mail
  1. x0952060001
    回复:
    0
    浏览:
    3,634