openmeetings-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: Emails need to be resend
Date Sat, 16 Feb 2013 21:04:16 GMT
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).


2013/2/16 <>

> 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!/dead_lock

View raw message