diff --git a/source/org/jivesoftware/smackx/workgroup/user/Workgroup.java b/source/org/jivesoftware/smackx/workgroup/user/Workgroup.java index 4db30db2a..dbcf30a71 100644 --- a/source/org/jivesoftware/smackx/workgroup/user/Workgroup.java +++ b/source/org/jivesoftware/smackx/workgroup/user/Workgroup.java @@ -14,7 +14,6 @@ package org.jivesoftware.smackx.workgroup.user; import org.jivesoftware.smackx.workgroup.MetaData; import org.jivesoftware.smackx.workgroup.WorkgroupInvitation; import org.jivesoftware.smackx.workgroup.WorkgroupInvitationListener; -import org.jivesoftware.smackx.workgroup.ext.email.EmailIQ; import org.jivesoftware.smackx.workgroup.ext.forms.WorkgroupForm; import org.jivesoftware.smackx.workgroup.packet.DepartQueuePacket; import org.jivesoftware.smackx.workgroup.packet.QueueUpdate; @@ -704,78 +703,6 @@ public class Workgroup { } } - /** - * Send an email from the workgroup. - * - * @param to the to address of the the user to send to. - * @param from who the email is from. - * @param subject the subject of the email. - * @param message the body of the email. - * @param sendAsHTML true if the message should be sent as html, otherwise specify false for plain text. - * @return true if the email was sent successfully, otherwise false. - * @throws XMPPException if an error occurs while sending the email. - */ - public boolean sendMail(String to, String from, String subject, String message, boolean sendAsHTML) throws XMPPException { - EmailIQ request = new EmailIQ(); - request.setToAddress(to); - request.setFromAddress(from); - request.setSubject(subject); - request.setMessage(message); - request.setHtml(sendAsHTML); - - request.setType(IQ.Type.SET); - request.setTo(workgroupJID); - - PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID())); - connection.sendPacket(request); - - - Packet response = collector.nextResult(SmackConfiguration.getPacketReplyTimeout()); - - // Cancel the collector. - collector.cancel(); - if (response == null) { - throw new XMPPException("No response from server."); - } - if (response.getError() != null) { - throw new XMPPException(response.getError()); - } - return true; - } - - /** - * Send an email from the workgroup. - * - * @param to the to address of the the user to send to. - * @param sessionID the sessionID of the chat. - * @return true if the email was sent successfully, otherwise false. - * @throws XMPPException if an error occurs while sending the email. - */ - public boolean sendTranscript(String to, String sessionID) throws XMPPException { - EmailIQ request = new EmailIQ(); - request.setToAddress(to); - request.setSessionID(sessionID); - - request.setType(IQ.Type.SET); - request.setTo(workgroupJID); - - PacketCollector collector = connection.createPacketCollector(new PacketIDFilter(request.getPacketID())); - connection.sendPacket(request); - - - Packet response = collector.nextResult(SmackConfiguration.getPacketReplyTimeout()); - - // Cancel the collector. - collector.cancel(); - if (response == null) { - throw new XMPPException("No response from server."); - } - if (response.getError() != null) { - throw new XMPPException(response.getError()); - } - return true; - } - /** * Asks the workgroup for it's Offline Settings. *