I wrote an application which sends mails with AutoSendBugReport from a users server. But I can't get it running, if I do call AutoSendBugReport nothing happens, I don't receive the mail.
If I use the madTestMailAPIs sample I'm able to send a mail from the users server. But which properties of "MESettings" do I have to set, to act the same like in the attached screenshot of madTestMailAPIs with code?
I tried filling these fields
Code: Select all
MESettings.MailAddr := gConstData.AMMSIniFile.ReadString(sPaths, 'MailAddr', sMailAddr);
MESettings.MailFrom := gConstData.AMMSIniFile.ReadString(sPaths, 'MailFrom', sMailFrom);
MESettings.SmtpServer := gConstData.AMMSIniFile.ReadString(sPaths, 'SmtpServer', sSmtpServer);
MESettings.SmtpPort := 25;
Code: Select all
if AutoSendBugReport(AMMSService.DisplayName, Screenshot, MESettings, True) <> Yes then begin
TMSLogger.Error('Error sending mail!');
end;
But that does not work.
What understanding madExcept realy makes very difficult is, that the property names of MESettings does not correspond to the settings in the .mes file. For example there is "MESettings.MailAddr" or "MESettings.MailFrom". To which settings in the .mes file are identical?
What would help a lot would be a feature in the madTestMailAPIs application which is able to create a .mes file of the settings in the dialog. so it we be very easy to try sending a mail with the flexibilty of the GUI and afterwards using the .mes file in the IDE of Delphi.
BTW, it is not possible to set the "port" value in the "madExcept 4.0.16 settings" dialog in the Delphi IDE. If I set it to "25" and press <OK> the value in the .mes file ist still "HttpPort=0".
TIA, Markus