public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)  {    
    Player player = null;
    if (sender instanceof Player) {
      player = (Player) sender;
    }

    ResultSet rs;
    java.sql.Statement stmt;
    Connection con;
    try {
      con = service.getConnection();
      stmt = con.createStatement();
      String ownernick = player.getName().toLowerCase(); 

      rs = stmt.executeQuery("SELECT * FROM SM_Mail WHERE sender='" + ownernick + "'");
      
      sender.sendMessage(plugin.GOLD+"- ID ----- TO ----------- DATE ------");
      while(rs.next()){
        String isread = rs.getString("read");          
        if (isread.contains("NO")) {
          sender.sendMessage(plugin.GRAY+"  [" +plugin.GREEN+ rs.getInt("id") +plugin.GRAY+"]"+"         "+rs.getString("target")+"          "+rs.getString("date"));            
        } else {
          sender.sendMessage(plugin.GRAY+"  [" +rs.getInt("id") +plugin.GRAY+"]"+"         "+rs.getString("target")+"          "+rs.getString("date"));
        }
      }
      sender.sendMessage(plugin.GRAY+"(deleted/expired messages will not be displayed)");
      rs.close();
    } catch(Exception e) {
      plugin.log.info("[SimpleMail] "+"Error: "+e);        
      if (e.toString().contains("locked")) {
        sender.sendMessage(plugin.GRAY+"[SimpleMail] "+plugin.GOLD+"The database is busy. Please wait a moment before trying again...");
      } else {
        player.sendMessage(plugin.GRAY+"[SimpleMail] "+plugin.RED+"Error: "+plugin.WHITE+e);
      }
    }
    
    return true;
  }