use of org.xwiki.mail.internal.DefaultMailResult in project xwiki-platform by xwiki.
the class MailStorageScriptService method resendAsynchronously.
/**
* Resend the serialized MimeMessage asynchronously.
*
* @param batchId the name of the directory that contains serialized MimeMessage
* @param uniqueMessageId the unique id of the serialized MimeMessage
* @return the result and status of the send batch; null if an error occurred when getting the message from the
* store
* @since 9.3RC1
*/
@Unstable
public ScriptMailResult resendAsynchronously(String batchId, String uniqueMessageId) {
try {
MailStatusResult statusResult = this.mailResender.resendAsynchronously(batchId, uniqueMessageId);
ScriptMailResult scriptMailResult = new ScriptMailResult(new DefaultMailResult(batchId), statusResult);
return scriptMailResult;
} catch (MailStoreException e) {
// Save the exception for reporting through the script services's getLastError() API
setError(e);
return null;
}
}
Aggregations