]> git.saurik.com Git - wxWidgets.git/commitdiff
added example code using wxEmail to send the debug report by mail
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Apr 2005 23:32:12 +0000 (23:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Apr 2005 23:32:12 +0000 (23:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/debugrpt/debugrpt.cpp

index 6680fe8a09f8567e487b5fb801e8367d0e62975a..cd2e4d5be228bad2abde461c255d5d3c45f127e1 100644 (file)
@@ -69,6 +69,32 @@ protected:
     }
 };
 
+// another possibility would be to build email library from contrib and use
+// this class, after uncommenting it:
+#if 0
+
+#include "wx/net/email.h"
+
+class MyDebugReport : public wxDebugReportCompress
+{
+public:
+    virtual bool DoProcess()
+    {
+        if ( !wxDebugReportCompress::DoProcess() )
+            return false;
+        wxMailMessage msg(GetReportName() + _T(" crash report"),
+                          _T("vadim@wxwindows.org"),
+                          wxEmptyString, // mail body
+                          wxEmptyString, // from address
+                          GetCompressedFileName(),
+                          _T("crashreport.zip"));
+
+        return wxEmail::Send(msg);
+    }
+};
+
+#endif // 0
+
 // ----------------------------------------------------------------------------
 // helper functions
 // ----------------------------------------------------------------------------