package voxo.client.actions;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.EnumSet;
import voxo.client.controllers.ClientController;
import voxo.client.services.NetworkService;
import voxo.common.entities.Packet;
import voxo.common.enums.EnumPacket;
import voxo.common.enums.EnumVerbose;
import voxo.common.packets.ChatPacket;
public class SendMailAction {
public SendMailAction(ClientController c, ChatPacket p){
try {
NetworkService.sendPacket(new Packet(EnumPacket.CLIENT_SendEmail, p));
} catch (UnknownHostException e) {
c.getVerbose().addConsoleMsg(e, EnumSet.of(EnumVerbose.ToConsole, EnumVerbose.ToLog));
new ServerErrorAction(c);
} catch (IOException e) {
c.getVerbose().addConsoleMsg(e, EnumSet.of(EnumVerbose.ToConsole, EnumVerbose.ToLog));
new ServerErrorAction(c);
}
}
}