use of com.zimbra.soap.mail.message.SendMsgRequest in project zm-mailbox by Zimbra.
the class TestExpandGroupInfo method sendMsg.
private void sendMsg(Account authAcct, String toAddress, String subject, String content) throws Exception {
SoapTransport transport = authUser(authAcct.getName());
MsgToSend msg = new MsgToSend();
EmailAddrInfo toAddr = new EmailAddrInfo(toAddress);
toAddr.setAddressType(EmailType.TO.toString());
msg.addEmailAddress(toAddr);
msg.setSubject(subject);
MimePartInfo mp = new MimePartInfo();
mp.setContentType("text/plain");
mp.setContent(content);
msg.setMimePart(mp);
SendMsgRequest req = new SendMsgRequest();
req.setMsg(msg);
SendMsgResponse resp = invokeJaxb(transport, req);
}
Aggregations