Zimlet to Pre-Process Email

Interested in talking about Mash-up's? This is the place.
roby.tea
Posts: 31
Joined: Sat Sep 13, 2014 3:18 am

Zimlet to Pre-Process Email

Postby roby.tea » Tue Dec 17, 2013 9:51 am

Hello
are there any news about this request?
[QUOTE]

Will there be functionality available that will prevent the message from being sent until a certain condition has been met? I can see this being a great way to develop a more efficient content filter for school use, which will prevent students from sending out messages containing swear words.
Eg. instead of "Do you wish to continue - Yes/No" - could the Zimlet say, for example, "Cannot continue due to Error X - OK".

Last edited by webman; 04-02-2009 at 10:54 AM.

[/QUOTE]


tdesorbaix
Outstanding Member
Outstanding Member
Posts: 366
Joined: Fri Sep 12, 2014 10:31 pm

Zimlet to Pre-Process Email

Postby tdesorbaix » Mon Jan 06, 2014 3:58 am

Yes, this was implemented a long time ago.
Check ZmZimletBase.js for the "emailErrorCheck" hook.
roby.tea
Posts: 31
Joined: Sat Sep 13, 2014 3:18 am

Zimlet to Pre-Process Email

Postby roby.tea » Fri Jan 10, 2014 10:53 am

Hello tdesorbaix,
I'm referring to the last question: g. instead of "Do you wish to continue - Yes/No" - could the Zimlet say, for example, "Cannot continue due to Error X - OK".
I've investigated the code and seems we can't prevent the message to be sent, but we can only answer to the user if he wants to continue or not.

I would like to totally stop the message if some conditions are not met, maybe warning the user "your message has not been sent because bla bla bla".
Thanks

Roberto
tdesorbaix
Outstanding Member
Outstanding Member
Posts: 366
Joined: Fri Sep 12, 2014 10:31 pm

Zimlet to Pre-Process Email

Postby tdesorbaix » Fri Jan 17, 2014 3:13 am

There is no simple solution if you use the function as it is.

But it still give you a hook(listener), and you can do everything you want afterward.

So you can implement the function in your zimlet to always return no errors, and manage the errors and dialog boxes with the zimlet instead of using the code available in zimbra.

The way to stop the process from sending the mail should be in the function executed when you click on "No" when asked if you want to continue, so you should look at ZmComposeView.prototype._errViaZimletCancelCallback

Return to “Zimlets”

Who is online

Users browsing this forum: No registered users and 3 guests