bug report to be sent in an email

delphi package - automated exception handling
Post Reply
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

bug report to be sent in an email

Post by emailaya »

I want Madexcept to catch the event of a bug, ask the user whether he wants to email me the bug report and if so, send it to my email from his own email address. I did the following:

procedure TfrmMain.ExceptionFilter(const exceptIntf : IMEException; var Handled : Boolean);
begin
Handled := TRUE;
if MessageBox(Application.Handle,'Oops, an error occured. Do you want to email the bug report to help improve this app?','App',mb_yesno) = idNo then exit;
//now I need madexcept to do the sending of exceptIntf.BugReport;
end;

I unchecked automatically send bug report (in order to first ask the user if he wants to email it to me), wrote my email and set "send via smtp" and checked "act as smtp server" option. Ofcourse nothing happened. What do I need to do in the above function (that is executed when a bug occurs) in order to send an email without the user will require to define his own email settings (except for his email address)?

can I use act as smtp client? Wouldn't it mean that my email and password will be integrated into the executable?
Thanks
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: bug report to be sent in an email

Post by madshi »

You could call "exceptIntf.SendBugReport()" which will be identical to the user pressing the "send bug report" button. Does that help?

Of course you can use "act as smtp client". You will then have to provide your own email and password, or alternatively you can ask the user for his. One "trick" is to create a dummy email account which you use just for sending bug reports. You could then use that email account's smtp data for the "act as smtp client" functionality. That way your private/company email account smtp data stays secret.
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

Re: bug report to be sent in an email

Post by emailaya »

I get the attached error when using the function you wrote me.

I checked the act as smtp server option - what does it mean? what server and criteria is it using?
act as smtp client - the only 2 options are to use my dummy email or ask his smtp server criteria (the user won't agree to that for sure)
Attachments
1.png
1.png (13.48 KiB) Viewed 3218 times
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: bug report to be sent in an email

Post by madshi »

Act as SMTP server only works with some email servers. These days is often doesn't work due to spam counter measures. You can try if it works, but if it doesn't, there's not much we can do about it.
Post Reply