Description
When sending a mail with the mail API, the mail is successful, but the logs report an error in the mail sender thread.
To reproduce:
- Configure mail sending
- Try a simple example from the documentation http://extensions.xwiki.org/xwiki/bin/view/Extension/Mail+Sender+API#HExample1:Sendasimpletextemail
- Observe the logs:
2016-07-05 12:28:01,067 [Mail Sender Thread] ERROR o.x.m.i.t.SendMailRunnable - Unexpected error in the Mail Sender Thread java.lang.IllegalArgumentException: An Entity Reference name cannot be null or empty at org.xwiki.model.reference.EntityReference.setName(EntityReference.java:186) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:171) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:142) at org.xwiki.model.reference.WikiReference.<init>(WikiReference.java:61) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getCurrentWikiReference(AbstractDocumentConfigurationSource.java:185) at org.xwiki.mail.internal.configuration.SendMailConfigClassDocumentConfigurationSource.getDocumentReference(SendMailConfigClassDocumentConfigurationSource.java:68) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getCacheKeyPrefix(AbstractDocumentConfigurationSource.java:122) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getPropertyValue(AbstractDocumentConfigurationSource.java:306) at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getProperty(AbstractDocumentConfigurationSource.java:301) at org.xwiki.mail.internal.configuration.DefaultMailSenderConfiguration.getSendWaitTime(DefaultMailSenderConfiguration.java:313) at org.xwiki.mail.internal.thread.SendMailRunnable.waitSendWaitTime(SendMailRunnable.java:177) at org.xwiki.mail.internal.thread.SendMailRunnable.runInternal(SendMailRunnable.java:108) at org.xwiki.mail.internal.thread.SendMailRunnable.run(SendMailRunnable.java:74) at java.lang.Thread.run(Thread.java:745)
Attachments
Issue Links
- is related to
-
XWIKI-12435 Use the Main Wiki Mail Configuration if not overridden at the subwiki level
- Closed