Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-24-2008, 10:45 AM
Partner (VAR/HSP)
 
Posts: 48
Default Zimlet to prepare a formated email

Hi,

I'm not very confident with developpement in general and specially with javascript but I need to develop a zimlet which can prepare a formated mail with only a signle click on the zimlet icon.

I'm lost in the documentations, indeed as someone that doesn't like code

Do you know how to do a simple zimlet like this ?

What I'd like is a simple zimlet that can send an email to "a" with a body and subject that I can edit in the code

Is it simple to do that ? I tried to understand some codes from other zimlets that were sending e-mails but I cound't make it to work correctly

Thank you

Regards
__________________
3 Release 5.0.16_GA_2313.UBUNTU6 Network edition
AND
1 Release 6.0.0_BETA2_1547.UBUNTU8 UBUNTU8 FOSS edition
Reply With Quote
  #2 (permalink)  
Old 09-25-2008, 02:41 AM
Zimlet Guru & Moderator
 
Posts: 205
Cool

Hi kaltera,

It is very simple.
There was a thread about this already :
opening-new-message-dialog-zimlet.html

I made a zimlet example using the code given in this thread :
Attached Files
File Type: zip compose_mail_example.zip (874 Bytes, 73 views)
Reply With Quote
  #3 (permalink)  
Old 09-30-2008, 06:42 AM
Partner (VAR/HSP)
 
Posts: 48
Default

Thank you very much tdesorbaix, that's exactly what I was looking for and it works perfectly!!

Do you know,based on that zimlet, how to generate a number which is increased by 1 everytime it is used and placed in the mail subject ?

I don't know if a Zimlet is smarter enough to keep in mind a number

Cheers,
Yohann
__________________
3 Release 5.0.16_GA_2313.UBUNTU6 Network edition
AND
1 Release 6.0.0_BETA2_1547.UBUNTU8 UBUNTU8 FOSS edition
Reply With Quote
  #4 (permalink)  
Old 10-01-2008, 01:58 AM
Zimlet Guru & Moderator
 
Posts: 205
Cool

Yeah, it is also very simple.
The number will be reset to 1 when you disconnect from your session or when you refresh your zimbra in the browser.

Here is the modified version :
Attached Files
File Type: zip compose_mail_example.zip (982 Bytes, 25 views)
Reply With Quote
  #5 (permalink)  
Old 10-01-2008, 02:11 AM
Partner (VAR/HSP)
 
Posts: 48
Default

Thank you for the answer, it is quite clear to me now !!

And if I don't want to reset that value to 1 ? I'd like to do this in particular :

User A sends mail with subject : Subjet #1
User B sends mail with subject : Subject #2
User A sends mail with subject : Subject #3
User C sends mail with subject : Subject #4

If I do not set the Compose_Mail_Example.count to 0, will that value stay as the last value for each user not depending on any session opened ?
__________________
3 Release 5.0.16_GA_2313.UBUNTU6 Network edition
AND
1 Release 6.0.0_BETA2_1547.UBUNTU8 UBUNTU8 FOSS edition
Reply With Quote
  #6 (permalink)  
Old 10-02-2008, 01:51 AM
Zimlet Guru & Moderator
 
Posts: 205
Default

If you want that the count is not for one user, but for all the users of the server, you have to store the value on the server side.
The javascript is executed on the client side, so you can't do it directly in the javascript file.
You ll have to use a jsp page (executed on the server side) for example called in your javascript file.
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com