Wiki source code of IMAP-Plugin
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
3.2 | 1 | [[**Plugin-Download**>>url:https://customer.formcycle.eu/index.php/apps/files/?dir=/FORMCYCLE%20-%20Plugins%20Customer/IMAP%26SMTP%20Mail-Proxy&fileid=3263||rel="noopener noreferrer" target="_blank"]] (requires login) |
![]() |
1.1 | 2 | |
3 | {{content/}} | ||
4 | |||
![]() |
3.2 | 5 | The {{smallcaps}}Imap{{/smallcaps}} plug-in for {{formcycle/}} lets you view the data submitted forms in your email client. This way you are notified of new submissions immediately. You can also move form records to different inboxes or delete them. This plugin is subject to additional charge. |
![]() |
1.1 | 6 | |
![]() |
3.2 | 7 | Technically speaking, this plugin provides an {{smallcaps}}Imap{{/smallcaps}} and {{smallcaps}}Smtp{{/smallcaps}} server to which most common email client can connect. |
![]() |
1.1 | 8 | |
![]() |
3.2 | 9 | == Features == |
![]() |
1.1 | 10 | |
![]() |
3.2 | 11 | ; Immediate notification |
12 | : Immediately notifies users about newly submitted forms via the {{smallcaps}}Imap{{/smallcaps}} protocol | ||
13 | ; Configurable content | ||
14 | : The content of the notifications as well as the subject, sender and recipient can be configured freely using corresponding templates. You can also use [[variables>>doc:Formcycle.UserInterface.Variables||target="_blank"]] and insert links to the submitted form and values from the submitted form. | ||
15 | : Users can upload files in the form, and backend users can also attach files in the inbox. These files are attached automatically to the email message, so that you can open them in your email client. Starting from version {{{version major="2" minor="1"/}}} it is alternatively also possible to define limits, starting from which files should only be listed in an attached text file. | ||
16 | ; Mapped inboxes | ||
17 | : All inboxes to which you have access are created in your email client. In addition, the folder //Inbox// always points to the default inbox and contains all available form records. | ||
18 | ; Manage form entries | ||
19 | : Other than just viewing submitted forms, you can also perform several actions such as moving form records to different inboxes. When you have read an email, the form record in the {{formcycle/}} inbox is also marked as read; and when you delete an email by moving it to the trash, the form record is deleted as well. Please note that when you lack permission to do so, the deleted email will reappear in the inbox. | ||
![]() |
1.1 | 20 | |
![]() |
3.2 | 21 | The provided {{smallcaps}}Smtp{{/smallcaps}} server is a stub, and messages send to it are discarded and not processed any further. |
22 | |||
![]() |
1.1 | 23 | == Installation == |
24 | |||
![]() |
3.2 | 25 | Install the plugin as a system plugin in the backend. Please note that the initial installation may take up to several minutes, depending on the number of form records, as they need to be prepared for the {{smallcaps}}Imap{{/smallcaps}} server. |
![]() |
1.1 | 26 | |
27 | {{info}} | ||
![]() |
3.2 | 28 | The {{smallcaps}}Imap{{/smallcaps}} plugin does not consider the client scope where it is installed when logging in and delivering messages. It is always available to all users. Therefore it is recommended to install the plugin as a system plugin. This also avoids possible issues with duplicate ports and allows for the plugon to be configured centrally. |
![]() |
1.1 | 29 | {{/info}} |
30 | |||
![]() |
3.2 | 31 | == Plugin configuration . It contains settings for the email server connection and lets you define how the emails should look like. == |
![]() |
1.1 | 32 | |
![]() |
3.2 | 33 | {{figure image="config_en.png"}} |
34 | The configuration page of the plugin | ||
![]() |
1.1 | 35 | {{/figure}} |
36 | |||
![]() |
3.2 | 37 | After installing the plugin, the configuration parameters shown in the figure are available. The following configuration options are possible: |
![]() |
1.1 | 38 | |
![]() |
3.2 | 39 | === Configuration of the mail servers === |
![]() |
1.1 | 40 | |
41 | {{id name="server_config"/}} | ||
42 | |||
43 | ; smtp.binding.address | ||
![]() |
3.2 | 44 | : Default: //0.0.0.0//. Specifies the {{smallcaps}}ip{{/smallcaps}} address of the {{smallcaps}}Smtp{{/smallcaps}} server to use. The default value is //0.0.0.0//, which attempts to detect the {{smallcaps}}ip{{/smallcaps}} automatically. Changing this value is only necessary if multiple network adapters are in use or if the automatic detection fails. |
![]() |
1.1 | 45 | ; smtp.binding.port |
![]() |
3.2 | 46 | : Default: //25//. Specifies the port of the {{smallcaps}}Smtp{{/smallcaps}} server to use. The default value should only be changed if the default port is not available. |
![]() |
1.1 | 47 | ; imap.binding.address |
![]() |
3.2 | 48 | : Default: //0.0.0.0//. Specifies the {{smallcaps}}ip{{/smallcaps}} address to use for the {{smallcaps}}Imap{{/smallcaps}} server. The default value is //0.0.0.0//, which also uses an automatically detected {{smallcaps}}ip{{/smallcaps}}. Changing this value is only necessary if multiple network adapters are in use or the automatic detection fails. |
![]() |
1.1 | 49 | ; imap.binding.port |
![]() |
3.2 | 50 | : Default: //143//. Specifies the port of the {{smallcaps}}Imap{{/smallcaps}} server to use. The default value should only be changed if the default port is not available. |
51 | ; imap.batch.size (starting from {{version major="2" minor="1"/}}) | ||
52 | : Default: //50//. Specifies the number of messages to be delivered simultaneously. A lower value will reduces the memory usage but also the performance. | ||
![]() |
1.1 | 53 | |
![]() |
3.2 | 54 | === Configuration of the mail messages === |
![]() |
1.1 | 55 | |
56 | {{id name="message_files_config"/}} | ||
57 | |||
58 | ; mail.to.template | ||
![]() |
3.2 | 59 | : Default: //mail_to.txt//. Specifies the name of a client or form file to be used as a template for the email recipient. |
![]() |
1.1 | 60 | ; mail.from.template |
![]() |
3.2 | 61 | : Default: //mail_from.txt//. Specifies the name of a client or form file to be used as a template for the email sender. |
![]() |
1.1 | 62 | ; mail.subject.template |
![]() |
3.2 | 63 | : Default: //mail_subject.txt//. Specifies the name of a client or form file to be used as a template for the email subject. |
![]() |
1.1 | 64 | ; mail.body.template |
![]() |
3.2 | 65 | : Default: //mail_body.txt//. Specifies the name of a client or form file to be used as a template for the email content. |
66 | ; mail.attachment.limit (starting from {{version major="2" minor="1"/}}) | ||
67 | : Default: //10//. Maximum size of a file (in MB) above which it should not be attached, but listed in a text file (-1 = deactivated, 0 = lists all attachments). | ||
68 | ; mail.attachment.sum.limit (starting from {{version major="2" minor="1"/}}) | ||
69 | : Default: //-1//. Maximum sum of all file sizes (in MB) above which they should not be attached but listed in a text file (-1 = deactivated, 0 = always list all attachments). | ||
![]() |
1.1 | 70 | |
![]() |
3.2 | 71 | === Configuration of the synchronization === |
![]() |
1.1 | 72 | |
![]() |
3.2 | 73 | ; sync.max.threads (starting from {{version major="2" minor="1"/}}) |
74 | : Default: //4//. Number of threads with which the synchronization of messages should be performed. | ||
75 | ; sync.page.size (starting from {{version major="2" minor="1"/}}) | ||
76 | : Default: //50//. Number of messages with which a thread should perform the synchronization. | ||
![]() |
1.1 | 77 | |
![]() |
3.2 | 78 | === Configuration of the cache === |
![]() |
1.1 | 79 | |
![]() |
3.2 | 80 | ; cache.heap.size (starting from {{version major="2" minor="1"/}}) |
81 | : Default: //200//. Size of the RAM to be used in M. | ||
82 | ; cache.disk.size (starting from {{version major="2" minor="1"/}}) | ||
83 | : Default: //500//. Size of the hard drive memory to be used in MB. | ||
84 | ; cache.tti (starting from {{version major="2" minor="1"/}}) | ||
85 | : Default: //900//. Maximum age of a cache entry in seconds. | ||
![]() |
1.1 | 86 | |
![]() |
3.2 | 87 | == Email contents and fields == |
![]() |
1.1 | 88 | |
![]() |
3.2 | 89 | A template mechanism is used for the configuration of the content and fields of the email message that is sent. |
![]() |
1.1 | 90 | |
![]() |
3.2 | 91 | The templates are specified by the [[email message configuration>>||anchor="message_files_config"]]. When an email is sent, the plugin first looks for a template in the form files of the current form, and if none is found, it looks for a template in the client files. This lets you create global templates as client files and override them for specific forms, if neccessary. |
![]() |
1.1 | 92 | |
![]() |
3.2 | 93 | You can use [[variables>>doc:Formcycle.UserInterface.Variables||target="_blank"]] in all templates, such as when you want to insert data from the submitted form and would like to include a link to the form record. |
94 | |||
95 | The following templates can be configured: | ||
96 | |||
97 | ; Content | ||
98 | : Default value: //mail_body.txt//. Specifies the content of the email message. This template allows you to use {{smallcaps}}Html{{/smallcaps}} For example: | ||
99 | |||
![]() |
1.1 | 100 | {{code language="html"}} |
101 | <html> | ||
![]() |
3.2 | 102 | <head></head> |
103 | <body> | ||
104 | <p><a href="[%$FORM_INBOX_LINK%]">Link</a> to form entry ([%$PROCESS_ID%]).</p> | ||
105 | </body> | ||
![]() |
1.1 | 106 | </html> |
107 | {{/code}} | ||
108 | |||
![]() |
3.2 | 109 | ; Subject |
110 | : Default value: //mail_subject.txt//. Specifies the subject of the message and must not contain {{smallcaps}}Html{{/smallcaps}}. For example: | ||
![]() |
1.1 | 111 | |
112 | {{code language="none"}} | ||
![]() |
3.2 | 113 | ID: [%$RECORD_ID%] - [%$STATUS_NAME%] |
![]() |
1.1 | 114 | {{/code}} |
115 | |||
![]() |
3.2 | 116 | ; Recipient |
117 | : Default value: //mail_to.txt//. Specifies the recipient of the message and must not contain {{smallcaps}}Html{{/smallcaps}}. This is to be entered according to the pattern //name <user@example.com>// and has no effect on the actual receipt of the message. Example: | ||
![]() |
1.1 | 118 | |
119 | {{code language="none"}} | ||
120 | XIMA FORMCYCLE <no-reply@example.com> | ||
121 | {{/code}} | ||
122 | |||
![]() |
3.2 | 123 | ; Sender |
124 | : Default value: //mail_from.txt//. Specifies the sender of the message and must not contain {{smallcaps}}Html{{/smallcaps}}. You need to enter the sender using the pattern //Name <user@example.com>//. The sender has no effect on how the message is sent. Example: | ||
![]() |
1.1 | 125 | |
126 | {{code language="none"}} | ||
127 | [%$PROJECT_NAME%] <[%$PROJECT_NAME%]@example.com> | ||
128 | {{/code}} | ||
129 | |||
![]() |
3.2 | 130 | == Email client configuration == |
![]() |
1.1 | 131 | |
![]() |
3.2 | 132 | Use the the address and port of the email server, as configured in the [[plugin configuration>>||anchor="server_config"]] must be used. Below you can find a list of all settings: |
![]() |
1.1 | 133 | |
![]() |
3.2 | 134 | ; {{smallcaps}}Smtp{{/smallcaps}} server |
135 | : //<server address>// | ||
136 | ; {{smallcaps}}Smtp{{/smallcaps}} port | ||
137 | : see [[email server service configuration>>||anchor="server_config"]] | ||
138 | ; {{smallcaps}}Imap{{/smallcaps}} server | ||
139 | : //<server address>// | ||
140 | ; {{smallcaps}}Imap{{/smallcaps}} port | ||
141 | : see [[email server service configuration>>||anchor="server_config"]] | ||
142 | ; Username | ||
143 | : //<FORMCYCLE-user>@<FORMCYCLE-clientname>// | ||
144 | ; Password | ||
145 | : //<FORMCYCLE-user-password>// | ||
146 | ; Authentication | ||
147 | : Normal password | ||
148 | ; SSL encryption and connection security | ||
149 | : None | ||
![]() |
1.1 | 150 | |
![]() |
3.2 | 151 | == Example configuration for Thunderbird == |
![]() |
1.1 | 152 | |
![]() |
3.2 | 153 | 1. Open the email account management via //Preferences// > //Account Settings//.{{lightbox image="thunderbird_1_en.png" group="g0" width="300"/}} |
154 | 1. Click on //Account Actions// > //Add Mail Account...// to open the dialog for adding a new account.{{lightbox image="thunderbird_2_en.png" group="g0" width="500"/}} | ||
155 | 1. Initially, Thunderbird tries to determine the email server automatically based on the entered email address (here //user@imap.com//). Since this is not possible here, you can cancel that attempt by clicking on the //Manual config// button.{{lightbox image="thunderbird_3_en.png" group="g0" width="500"/}} | ||
156 | 1. Fill out the email server settings. See above for what you should enter in each field. In the example, the client name is //imap.com// and the user name //user// and the standard ports are used.{{lightbox image="thunderbird_4_en.png" group="g0" width="500"/}} | ||
157 | 1. After you complete the configuration, the user's mailboxes now appear as folders (here //central mailbox// and //demo mailbox//) and contain the messages of the existing form records.{{lightbox image="thunderbird_5_en.png" group="g0" width="700"/}} | ||
![]() |
1.1 | 158 | |
![]() |
3.2 | 159 | == Version history == |
![]() |
1.1 | 160 | |
![]() |
3.1 | 161 | **Version 3.0.1** |
162 | |||
![]() |
3.2 | 163 | * Fixing a deadlock when importing projects under MSSQL. |
164 | * Increased reliability of message synchronization | ||
165 | * Removal of non-replaced placeholders from sender and recipient addresses | ||
166 | * System specific default ports for improved installation under Linux | ||
![]() |
3.1 | 167 | |
168 | **Version 3.0.0** | ||
169 | |||
![]() |
3.2 | 170 | * Update for {{formcycle/}} version 7.0.1 |
171 | * Update for Java 11 | ||
![]() |
3.1 | 172 | |
![]() |
1.1 | 173 | **Version 2.1.0** |
174 | |||
![]() |
3.2 | 175 | * Switching to {{formcycle/}} version 6.5.5 |
176 | * Updated the used libraries | ||
177 | * Optimization of memory consumption and database queries | ||
178 | * Integration of a cache for the header and body of messages | ||
179 | * Correction of errors when reading the IMAP BODYSTRUCTURE | ||
180 | * Reintegration of the configuration of the attachment limits | ||
181 | * Extension of the configurability of IMAP batch size and synchronization | ||
![]() |
1.1 | 182 | |
183 | **Version 2.0.0** | ||
184 | |||
![]() |
3.2 | 185 | * Modifications for compatibility with {{formcycle/}} version 6.0.2 |
![]() |
1.1 | 186 | |
187 | **Version 1.0.1** | ||
188 | |||
![]() |
3.2 | 189 | * Optimizations and extensions of the configurability |
![]() |
1.1 | 190 | |
191 | **Version 1.0.0** | ||
192 | |||
![]() |
3.2 | 193 | * Initial release |