Sending Screenshot

delphi package - automated exception handling
Post Reply
vikramvk
Posts: 2
Joined: Thu Mar 16, 2006 6:57 pm

Sending Screenshot

Post by vikramvk »

I am using this code in madExcept to send a screen shot by creating a dummy
bug report. I had originally found this code on this newsgroup.

For some reason it does not work. I remember it used to work in the previous
version of madExcept.

procedure SendASCreenShot;
var
bg,
TempStr,
sc: String;
ASC : INVBitMap;
begin
bg := madExcept.CreateBugReport(etNormal);
TempStr := madExcept.MESettings.MailSubject;
madExcept.MESettings.MailSubject := 'Dumpscreen for MyProduct from License
No:';
sc := madExcept.MESettings.MailBody;
madExcept.MESettings.MailBody := 'Please find attached the screen shot';
madExcept.MESettings.MailFrom := MYUserName;
ASC := madNVBitmap.ScreenShot(True);
madExcept.SendBugReport(bg, ASC);
madExcept.MESettings.MailSubject := TempStr;
madExcept.MESettings.MailBody := sc;
end;

My email settings are as follows:

Send Bug Report in background : True
Mail or upload directly via internet : True
Act as a SMTP mail client is selected
Contact the Mail client via MAPI : True
Contact the mail client via mailto : True

I have specified a valid SMTP server and port. My server does not require
authentication.

Also, I tested using the "madTestMailAPIs.exe" tool and it sent the mail
correctly!!

Please help.

Thanks
Vikram
--
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

What exactly do you mean with "it does not work"? Can you please be a bit more specific?

Also, does mailing work if you raise a real exception and let madExcept handle it the normal way?
vikramvk
Posts: 2
Joined: Thu Mar 16, 2006 6:57 pm

Post by vikramvk »

I mean it just doesn't do anything. I dont recv any email. Interestingly, I do see the "Sending mail" status bar show up a tthe bottom.

Yes, in case of a normal exception it does sent me the email.

Separately I have been trying out some other code to send email (from this forum). I am testing and will post the code soon.

Thanks
Vikram
Post Reply