Page 1 of 1

Using an own SendMail function

Posted: Wed Aug 24, 2016 5:12 pm
by amw
As many of my customers just use web based mail instead of an e-mail client, I'm going the following route:

Use the following settings:

Code: Select all

      madExcept.MESettings.AutoSave := TRUE;
      madExcept.MESettings.AutoSaveIfNotSent := TRUE;
in madExceptionHandler.OnExceptAction I do the following:

Code: Select all

   if action = eaSendBugReport then
   begin
      handled := TRUE;

      1. Copy exceptIntf.BugReport to the clipboard
      2. Show a message box with a small description, and if the user press "open form", then:
          2.1. open http://www.domain.com/webform.php in browser where the user can paste the bug report
          2.2. ????? How to tell madExcept that the bugReport has been sent ?????
   end;
This works very well, but madExcept always saves the bugreport. How can I tell madExcept that the bug report has been sent if 2.1 is executed?

Re: Using an own SendMail function

Posted: Mon Aug 29, 2016 4:48 pm
by madshi
Does it workaround the problem if you set "exceptIntf.AutoSave := false" and "exceptIntf.AutoSaveIfNotSent := false" when your sending has completed?

Re: Using an own SendMail function

Posted: Mon Aug 29, 2016 6:19 pm
by amw
yes, this is what I will use now to temporarily disable the AutoSave flags. I think this is something I can live with. Thanks.

Re: Using an own SendMail function

Posted: Mon Aug 29, 2016 6:33 pm
by madshi
FWIW, doing this on "exceptIntf" instead of "MESettings" will automatically only affect the current exception, so it should be a proper and clean solution, and you don't have to "change it back" or anything like that.

Re: Using an own SendMail function

Posted: Mon Aug 29, 2016 6:41 pm
by amw
Thanks, I'll try that :)

Re: Using an own SendMail function

Posted: Mon Aug 29, 2016 6:49 pm
by amw
Wonderful, does exactly what I need now :)

Thank you very much for your help!!!

Re: Using an own SendMail function

Posted: Mon Aug 29, 2016 6:53 pm
by madshi
My pleasure!