Root > How to... > ...send a feedback/support request instead of bug report?

...send a feedback/support request instead of bug report?

Previous pageReturn to chapter overviewNext page   

Note: you can download a sample code for the desktop UX summit 2021 session here.



You may want to use EurekaLog's sending capabilities to send arbitrary data (such as feedback from users or support requests). You don't need to perform a full exception processing to do so.


Note: consider using a web-form HTML page to contact you for feedback and support requests. You can open URL to such page from within your application via ECore.ShellExec function (for example, you can have a "Help" / "Contact Us" menu item in your app). This is often a preferable option, because it allows you to use different/separate work-flows and back-ends for crash reports and communications with users.


If you still want to use EurekaLog to send feedback and/or support requests - you have to ensure that submission from users will not be confused with crash reports. You can do this by:

1. Creating two different "projects" in your bug tracker: one is for crash reports, another one is for users' feedback;
2. Creating a new "category" in your bug tracker for feedback;
3. Using a prefixes like [FEEDBACK], [SUPPORT], [CRASH], [LEAK] in your e-mails;
4. Using tags in your bug tracker is also an option, but it is not recommended (however, you can combine tags with a new project/category).



Option 1: use e-mail

You can use EurekaLog to send e-mail with user's text to the specified address. You can:

1. Use e-mail options as configured in EurekaLog options for your project;
2. Configure e-mail sending completely in your code;
3. Use e-mail options as configured in EurekaLog options for your project as base settings and modify them (for example, by adding prefix to subject, or changing/appending user's contacts).

All these options are described in the How to send an e-mail article.


We recommend that you collect (in other words, have input controls for) user's name, user's e-mail, user's message. That way you will be able to contact user with your reply.


Note: Simple MAPI, MAPI, and Shell/mailto will use preconfigured user account and do not require you to collect name/e-mail.



Option 2: use bug/issue tracker

You can also use EurekaLog to post arbitrary data into your bug tracker.


Important: the common issue with bug tracker: it does not allow to use an arbitrary e-mail as the recipient. E.g. when user sends you a message to your bug tracker with EurekaLog - you will see it as if it is coming from your crash report reporter account. You will have no way to reply back. You have to collect user's e-mail and append it to the message, so you can manually send a reply back via e-mail. This is why it is usually not a good idea to use your bug tracker to handle support requests. There are exceptions, though. For example, FogBugz allows you to specify arbitrary correspondent in the sCustomerEmail field (filled by EurekaLog automatically). A combined bug and issue tracker may also allow to add 3rd party recipients. Please, refer to documentation for your bug tracker to learn more about its features.


Overall, you need to do these steps:

1. You have to configure your bug tracker in EurekaLog's options for your project. Be sure that you can send normal crash reports to your bug tracker;
2. [optional] It is highly recommended to have either separate "project" or "category" (dedicated to user's feedback) in the configuration of your bug tracker;
3. You have to disable the normal workflow for the bug tracker. In other words, you don't need grouping "same" feedback under a single ticket;
4. Finally, you need to send user's message from your code.


Steps 3 and 4 are described below. Mantis is used as example, but you can replace it with your selected bug tracker. The steps should remain the same.



A). Altering workflow

First, you need to subclass the class for your bug tracker. For example:


  // Replace with unit for your bug tracker
  // Create your own class with the same name
  TELTrackerMantisSender = class(ESendAPIMantis.TELTrackerMantisSender)
  // ...



  // Register send class to be the first in the list


Once you have your class override set up - now you need to alter its .Search method. This method is used to determine if a new bug is being posted, or if it is a duplicate. Our goal is to post feedback as a "new bug" (always).


  ETypes,        // for TResponse
  ESendAPIMantis;// for TELTrackerMantisSender
  TELTrackerMantisSender = class(ESendAPIMantis.TELTrackerMantisSender)

    // Add override to change the workflow
    function Search: TResponse; override;
function TELTrackerMantisSender.Search: TResponse;
  function ThisIsAFeedback: Boolean;
    // This is just an example
    // See also code below
    Result := Options.CustomFieldBool['_my_feedback'];
  if ThisIsAFeedback then
    // This is just a quick way to fill Result with defaults

    // Default values will indicate that currently sent "report" is a "new bug"
    CheckWinInetError(False, Result)
    // Use default workflow for normal crash reports
    Result := inherited Search;


This code will block grouping reports for feedback messages, while will not change default workflow for usual crash/leak reports. We are using a custom flag for this. The idea is that flag will be missing (set to False) when a crash/leak report is being sent by EurekaLog. However, if we are sending a feedback message manually - we can set this flag to True. See code below.


You are free to modify other methods. For example, you may want to modify .Insert method to add tags for feedback messages or to include/exclude/alter some fields. A .CustomFields property may be used to add values for custom fields.



B). Sending the message

Now you can send the message itself. The idea is to take all EurekaLog settings as specified in options for your project, and then make minimal adjustments/customizations.


  EConsts,       // for sifXYZ constants
  EHash,         // for CRC16Hash
  EClasses,      // for TEurekaModuleOptions
  EModules,      // for CurrentEurekaLogOptions
  ESysInfo,      // for various GetXYZ functions
  ESend;         // for EurekaLogSend
procedure TForm1.ButtonFeedbackClick(Sender: TObject);
  Options: TEurekaModuleOptions;
  Files: TStringList;
  Options := TEurekaModuleOptions.Create('');
  Files := TStringList.Create;

    // 1: copy from EurekaLog's project options

    // 2: indicate that this is a feedback

    // this is an arbitrary "flag", 

    // which can be checked by our other code (see above)
    Options.CustomFieldBool['_my_feedback']        := 


    // 3: store your feedback message from user
    Options.CustomField[sifBugText]                := 

      'Your feedback message'// e.g. Memo1.Text
    Options.CustomField[sifBugType]                := 

      'Short caption (subject)'// e.g. Edit1.Text
    // 4: you have to redefine BugID, 

    // so it will unique identify this message
    Options.CustomField[sifBugID]                  := 
      '0000' + IntToHex(CRC16Hash(UTF8Encode(
        Options.CustomField[sifBugType] + 
      )), 4);

    // This will produce BugID like '00001234'

    // '0000' will prevent later crash reports to be grouped
    // 5: (optional) add additional text, if needed 

    // (for example, user name and e-mail)
    Options.CustomField[sifMessage]                := 

      'usually this holds bug report text, ' +

      'you can replace it with any content or an empty string';
    Options.CustomField[sifStepsToReproduce]       := 

      'steps to reproduce';
    // 6: (optional) you may want to change caption/category/project/etc.
    Options.SendMantisCategory                     := 

      'Feedback'// this is just an example
    // 7: (optional) fill other informational fields
    Options.CustomField[sifBugAppVersion]          := 

    Options.CustomField[sifBuild]                  := 

    Options.CustomField[sifMachineID]              := 

    Options.CustomField[sifOSBuild]                := 

    Options.CustomField[sifOSType]                 := 

    Options.CustomField[sifPlatform]               := 

    Options.CustomField[sifUserEMail]              := 

      ESysInfo.GetUserEMail; // you can also ask user, e.g. Edit2.Text


    // 8: attach files (if any)
    // 9: actual send
    EurekaLogSend(Options, Files);


Important Note: the code above assumes that your project already have a bug tracker configured (Mantis in the example above). If you are looking for a code to send issue/feedback completely from your code (without external dependencies) - you don't need Options.Assign(CurrentEurekaLogOptions); line, but you should add these instead:


    // Replace with your selected bug tracker

    Options.SendClasses := wsmMantis; 

    // wsmMantis is defined in ETypes, 


    // Code below is only an example, replace with your data
    Options.SendMantisURL := ''
    Options.SendMantisPort := 443;
    Options.SendMantisSSL := True;
    Options.SendMantisLogin := 'your-login';               
    Options.SendMantisPassword := 'your-password-or-token';
    Options.SendMantisProject := 'Test';               
    Options.SendMantisCategory := 'Feedback'
    Options.SendMantisCountFieldName := 'Occurencies';
    Options.SendMantisBugIDFieldName := 'BugID'
    Options.SendMantisEMailFieldName := 'Contact EMail'
    Options.SendMantisUseVersion := False;



See also:

Send feedback... Build date: 2023-09-11
Last edited: 2023-08-09
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: