Skip to content
Snippets Groups Projects
Commit 17f146ab authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

fix of errors when a newMail object is generated

parent db5d1715
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
<loggingConsoleEnabled v="true" />
<loggingFileEnabled v="true" />
<loggingRemoteEnabled v="false" />
<mailGlobalEnabled v="true" />
<neonVaadinClientEnabled v="true" />
<neonDisableConnectionSecurity v="false" />
<neonUseDummyKeystore v="true" />
......
import("system.logging");
import("system.translate");
import("system.text");
import("system.db");
......@@ -125,7 +126,18 @@ Email.prototype.getMailtoUrl = function ()
Email.prototype.getRFCmail = function ()
{
var ENCODING = "UTF-8";
var mailId = mail.newMail();
var mailId;
try
{
mailId = mail.newMail();
}
catch(ex)
{
//TODO: fix this dirty workaround [waiting for #1038963], since newMail causes an error on the first call after a user logged in
logging.log(ex);
util.sleep(1500);
mailId = mail.newMail();
}
if (this.toRecipients.length)
mail.addRecipients(mailId, mail.RECIPIENT_TO, this.toRecipients);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment