Code: Select all
MailAddr := '<recipient>';
SendInBackground := True;
MailAsSmtpClient := True;
SmtpServer := '<server name/IP (tried both)>';
SmtpPort := <port>;
SmtpAccount := '<username>';
SmtpPassword := '<password>';
// MailViaMailTo := True;
MailFrom := 'madExcept@<myserver>';
MailSubject := '<subject line>';
ScreenShotAppOnly := True;
// AttachBugReport := True;
// BugReportSendAs := 'ExceptionReport.txt';
// ScreenShotSendAs := 'ScreenShot.bmp';
I've blanked out all settings in the madExcept dialog in the IDE at design time. When I click the button to continue, which closes the exception form, the formclose event fires and calls this code:
Code: Select all
var
i: Integer;
begin
i := 0;
while i < FExceptionIntf.BugReportSections.ItemCount do
begin
if (FExceptionIntf.BugReportSections.Items[i] = 'hardware') or
(FExceptionIntf.BugReportSections.Items[i] = 'processes') or
(FExceptionIntf.BugReportSections.Items[i] = 'disassembling') or
(FExceptionIntf.BugReportSections.Items[i] = 'cpu registers') or
(FExceptionIntf.BugReportSections.Items[i] = 'modules') or
(FExceptionIntf.BugReportSections.Items[i] = 'stack dump') then
FExceptionIntf.BugReportSections.Delete(i)
else
inc(i);
end;
// FExceptionIntf.MailBody := FExceptionIntf.BugReportSections.Items[0] + FExceptionIntf.BugReportSections.Items[1];
FExceptionIntf.SendBugReport;
Thanks.