Return-Path: X-Original-To: apmail-openmeetings-user-archive@www.apache.org Delivered-To: apmail-openmeetings-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9EEB3EC1F for ; Sat, 16 Feb 2013 21:05:04 +0000 (UTC) Received: (qmail 70472 invoked by uid 500); 16 Feb 2013 21:05:02 -0000 Delivered-To: apmail-openmeetings-user-archive@openmeetings.apache.org Received: (qmail 70452 invoked by uid 500); 16 Feb 2013 21:05:02 -0000 Mailing-List: contact user-help@openmeetings.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@openmeetings.apache.org Delivered-To: mailing list user@openmeetings.apache.org Received: (qmail 70444 invoked by uid 99); 16 Feb 2013 21:05:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2013 21:05:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of seba.wagner@gmail.com designates 74.125.82.49 as permitted sender) Received: from [74.125.82.49] (HELO mail-wg0-f49.google.com) (74.125.82.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2013 21:04:57 +0000 Received: by mail-wg0-f49.google.com with SMTP id 15so3778417wgd.16 for ; Sat, 16 Feb 2013 13:04:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=e9atNBnkUibp9tFnJv2dQJFnr0RkHSkpBEEtcaJVEx8=; b=rjvj0gdV2uuiRaEkY8DhG4MDcsN1uXyvDt89TwK7TgcXBp1riIJUauoXygJ7PJBlBJ cS70nLVgDa5F8LVGCA2HaCwaRtTmzRwss2gfYfHdua5dZrzs1x0MmMZ396x8FxkV02Lj CeiF4K6X8iokGzR0ALhfZci8EL9+s6BDM3vbUhG93Uf+WqaKXayr3Vq2BQaK5Zvo290a JeLF8+a+WUqPACDBfjBRGkrnYBBga4AKctRWIX6Ng6j2oyMHBuyDKgCjh49vobpZpJzX 6FrXRFKzEYDcBy0mKRAeegfDkiXw2DvUPHEvG0dMgm1hCra3btakQK3NMFmNUfgFWvRT HnAA== X-Received: by 10.194.236.233 with SMTP id ux9mr10933834wjc.36.1361048676065; Sat, 16 Feb 2013 13:04:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.172.2 with HTTP; Sat, 16 Feb 2013 13:04:16 -0800 (PST) In-Reply-To: References: From: "seba.wagner@gmail.com" Date: Sun, 17 Feb 2013 10:04:16 +1300 Message-ID: Subject: Re: Emails need to be resend To: user@openmeetings.apache.org Content-Type: multipart/alternative; boundary=089e01493ee4dbe06d04d5ddd66d X-Virus-Checked: Checked by ClamAV on apache.org --089e01493ee4dbe06d04d5ddd66d Content-Type: text/plain; charset=ISO-8859-1 The last time I did that I just replaced the class "MailHandler" All emails are processed by it. If added a table "mail_queue" with the fields: subject, body, status, receipients, status, error (all string, receipients can be a comma separated list of emails) And then the MailHandler just adds entries to this table with status "new". And a scheduler checks every xx seconds this table and processes the first 10 entries where status LIKE "new" and sets the status to "processing". If the Mail sending itself throws and error/exception, this string is written to "error" and the status is set to "fail". If the mail sending is "sucess" the record will be deleted from the table. If the entry is status LIKE "new" => status is new and the mail will be send If the entry is status LIKE "processing" => the mail is currently in sending process So the queue does only process those emails that are status LIKE "new" to prevent double sending, and by keeping the failed ones we might in the future be able to show some nice UI dialog in the Admin UI with the error report (and give the admin an option to delete even those entries after checking it). Sebastian 2013/2/16 seba.wagner@gmail.com > Yeah sure just go ahead > Am 16.02.2013 17:01 schrieb "Maxim Solodovnik" : > > Hello All, >> >> I'm going to implement MailQ to be able to resend emails in case of any >> error is occurred. >> >> Currently we have following list of emails: >> >> 1. Meeting reminder (sent by schedule, periodically) >> 2. Invitation to the room >> 3. Appointment creation/modification/cancellation >> 4. User creation >> 5. Password reset >> 6. Feedback >> 7. Add user to the contact list/accept it >> >> I believe all emails from the list above except for 1) should be added to >> the mail Q instead of being immediately sent and keep sending until success. >> >> Do you have any concerns/ideas regarding the topic? >> I'm going to implement my solution in case there will be no objections :) >> >> >> -- >> WBR >> Maxim aka solomax >> > -- Sebastian Wagner https://twitter.com/#!/dead_lock http://www.webbase-design.de http://www.wagner-sebastian.com seba.wagner@gmail.com --089e01493ee4dbe06d04d5ddd66d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The last time I did that I just replaced the cla= ss "MailHandler"
All emails are processed by it.
If added a table "mail_queue" with the fields:
subject, body,= status, receipients, status, error (all string, receipients can be a comma= separated list of emails)

And then the MailHandler just adds entries to this table with stat= us "new".
And a scheduler checks every xx seconds t= his table and processes the first 10 entries where status LIKE "new&qu= ot; and sets the status to "processing".
If the Mail sending itself throws and error/exception, this stri= ng is written to "error" and the status is set to "fail"= ;.
If the mail sending is "sucess" the record will = be deleted from the table.

If the entry is status LIKE "new" =3D&g= t; status is new and the mail will be send
If the entry is st= atus LIKE "processing" =3D> the mail is currently in sending p= rocess

So the queue does only process those emails that are status = LIKE "new" to prevent double sending, and by keeping the failed o= nes we might in the future be able to show some nice UI dialog in the Admin= UI with the error report (and give the admin an option to delete even thos= e entries after checking it).

Sebastian


=
2013/2/16 seba.wagner@gmail.com <seba.wagner@gmail.com>

Yeah sure just go ahead

Am 16.02.2013 17:01 schrieb "Maxim Solodovn= ik" <solo= max666@gmail.com>:

Hello All,

I'm going to implement M= ailQ to be able to resend emails in case of any error is=A0occurred.
<= div>
Currently we have following list of emails:
  1. Meeting reminder (sent by schedule, periodically)
  2. = Invitation to the room
  3. Appointment creation/modification/cancellati= on
  4. User creation
  5. Password reset=A0
  6. Feedback
  7. Add user to the contact list= /accept it
I believe all emails from the list above except for 1) = should be added to the mail Q instead of being immediately sent and keep se= nding until success.

Do you have any concerns/ideas regarding the topic?
I'm going to implement my solution in case there will be no obje= ctions :)


--
WBR
Maxim aka solomax



--
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http:= //www.wagner-sebastian.com
seba.wagner@gmail.com --089e01493ee4dbe06d04d5ddd66d--