
com.mailosaur.Analysis Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mailosaur-java Show documentation
Show all versions of mailosaur-java Show documentation
Mailosaur Java Bindings for Email Test Automation
package com.mailosaur;
import java.io.IOException;
import com.mailosaur.models.SpamAnalysisResult;
/**
* Message analysis operations.
*/
public class Analysis {
private MailosaurClient client;
public Analysis(MailosaurClient client) {
this.client = client;
}
/**
* Perform a spam analysis of an email.
*
* @param messageId The identifier of the message to be analyzed.
* @throws MailosaurException Thrown if Mailosaur responds with an error.
* @throws IOException Unexpected exception.
* @return The results of spam analysis performed by Mailosaur.
*/
public SpamAnalysisResult spam(String messageId) throws IOException, MailosaurException {
return client.request("GET", "api/analysis/spam/" + messageId).parseAs(SpamAnalysisResult.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy