diff --git a/src/main/java/cli/CommandLineParameters.java b/src/main/java/cli/CommandLineParameters.java index d85f82c..fb54d22 100644 --- a/src/main/java/cli/CommandLineParameters.java +++ b/src/main/java/cli/CommandLineParameters.java @@ -56,9 +56,6 @@ public class CommandLineParameters { @Parameter(names = {"-a", "--extract-attachments"}, description = "Extract Attachments.") private boolean extractAttachments = false; - @Parameter(names = {"-dc", "--disable-crashreports"}, description = "Do not send crash reports to the developer.") - private boolean disableCrashreports = false; - @Parameter(names = {"-ad", "--extract-attachments-directory"}, description = "Extract Attachments to this Directory, if this option is not present the directory is besides the pdf as \"-attachments\".") private String extractAttachmentsDir; @@ -153,14 +150,6 @@ public void setExtractAttachmentsDir(String extractAttachmentsDir) { this.extractAttachmentsDir = extractAttachmentsDir; } - public boolean isDisableCrashreports() { - return disableCrashreports; - } - - public void setDisableCrashreports(boolean disableCrashreports) { - this.disableCrashreports = disableCrashreports; - } - public boolean isGui() { return gui; } diff --git a/src/main/java/cli/Main.java b/src/main/java/cli/Main.java index 14536fc..972c072 100644 --- a/src/main/java/cli/Main.java +++ b/src/main/java/cli/Main.java @@ -42,8 +42,6 @@ * @author Nick Russler */ public class Main { - private static final String BUG_EMAIL_URL = "https://eml-to-pdf.com/email.php"; - public static void main(String[] args) throws IOException { CommandLineParameters cli = new CommandLineParameters(); JCommander jCmd = new JCommander(cli, args); @@ -121,47 +119,6 @@ public static void main(String[] args) throws IOException { MimeMessageConverter.convertToPdf(in, out, cli.isHideHeaders(), cli.isExtractAttachments(), cli.getExtractAttachmentsDir(), extParams); } catch (Exception e) { Logger.error("The eml could not be converted. Error: %s", Throwables.getStackTraceAsString(e)); - - if (!cli.isDisableCrashreports()) { - /* Try to send the bugreport via email */ - StringBuilder bugdetails = new StringBuilder(800); - - bugdetails.append("User: "); - bugdetails.append(System.getProperty("user.name")); - bugdetails.append("\n"); - - InetAddress localHost = InetAddress.getLocalHost(); - bugdetails.append("Localhost: "); - bugdetails.append(localHost.getHostAddress()); - bugdetails.append(" - "); - bugdetails.append(localHost.getHostName()); - bugdetails.append("\n"); - - bugdetails.append("GEO: "); - bugdetails.append(HttpUtils.getRequest("http://ipinfo.io/json").replaceAll("\"", "")); - bugdetails.append("\n"); - - bugdetails.append("OS: "); - bugdetails.append(System.getProperty("os.name")); - bugdetails.append(" "); - bugdetails.append(System.getProperty("os.version")); - bugdetails.append(" "); - bugdetails.append(System.getProperty("os.arch")); - bugdetails.append("\n"); - - bugdetails.append("Java: "); - bugdetails.append(System.getProperty("java.vendor")); - bugdetails.append(" "); - bugdetails.append(System.getProperty("java.version")); - bugdetails.append("\n\n"); - - bugdetails.append("Exception\n"); - bugdetails.append(Throwables.getStackTraceAsString(e)); - - String subject = "Bugreport from " + System.getProperty("user.name") + " | " + new Date(); - - HttpUtils.postRequest(BUG_EMAIL_URL, String.format("subject=%s&body=%s", subject, bugdetails.toString())); - } } } } \ No newline at end of file