Newbie guestion: User/System Info and convert to Email

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • alexr
    Forum Member
    • Apr 2005
    • 4

    Newbie guestion: User/System Info and convert to Email

    Hello,
    I would like to gather user info and then have this information embedded into the body of email to be sent back to the admin.
    I found (on this forum) example of getting systeminfo - it is called "Test Connection".apz i believe. It is nice table format in browser.

    I now have trouble getting that information into the body of an email. Is there a simple way to convert the table information into formatted text so I can insert using ... &body= ..[ ]. I would like to understand how to assign one variable to capture all the relevant table info if possible-

    Also, would like to add the dependency shortcomings to the table- eg: if no current version of Reader- show that in table with system info.

    I hope to be clear.

    Thanks for any help - new user
  • Stefan_M
    Indigo Rose Customer
    • Nov 2003
    • 315

    #2
    Hi,

    You do not need to insert the html-code.
    Simply append the html-file to the email.

    _Path: Path and name of your html-file

    Code:
    adress='[email protected]';
    subject='Help';
    Body='Your Problem:'..'%0A%0A';
    attachment='"'.._Path..'"';
    File.OpenEmail(adress..'?subject='..subject..'&Body='..Body..'&attachment='..attachment, SW_SHOWNORMAL);
    2.
    See "Project/Dependencies"
    Use the appropriate variable from the Dependencies Page
    e.g. _AcrobatReaderVer

    Stefan_M
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

    Comment

    • alexr
      Forum Member
      • Apr 2005
      • 4

      #3
      Stefan_M
      Thank you. I have tried your suggestions and am unable to produce desired result. I can not even get the file email.open command to "attach" a file of any kind. Nor can I get the contents of the htm file into the body.

      I am sure I have syntax problems with all the ", ', . and the like. Attached is .apz (form this forum).

      Any help is appreciated greatly.

      alexr
      Attached Files

      Comment

      • alexr
        Forum Member
        • Apr 2005
        • 4

        #4
        Any chance anyone else has had success either "attaching" a file to email as stefan_ suggests- or creating a text representative in the body of the email- I must be thick- still unable to get the result and going crazy.

        Also, I notice whenever I do get something (simple variable or other) in the body of the email (&body="body text here ") any default signature on the email is now gone or overwritten. Is that normal.

        Any further help is greatly appreciated

        ....

        Comment

        • CWRIGHT
          Indigo Rose Customer
          • Jun 2002
          • 42

          #5
          I think the trouble with trying to be too clever with the File.OpenEmail action, is that how successful you are will depend on the capabilities of the email client.

          If it were me, I would re-write the function that creates the sysinfo html file, so that it creates a formatted string value instead. You could then add this string to the body of the email instead of trying to add an attachment.

          For full compatability, you would need to run the string through a url encoder first, and also be aware that there would be a limit to the total number of characters that could be used in the body string ( the same limit as any URL or mailto: ).

          Here is a URL encoding function I wrote for AMS, which might be useful:

          Code:
          function URLEncode(text_in)
          
              text_out = "";
          
              for x=1, String.Length(text_in) do
                  char = String.Mid(text_in, x, 1);
                  if not (string.find(char, "^%w")) then
                      char = String.Asc(char);
                      if (char == -1) then char = 63 end
                      char = string.format("%%%02X", char);
                  end
                  text_out = text_out .. char;
              end
          
              return text_out;
          	
          end

          Comment

          • Corey
            Indigo Rose Staff Alumni
            • Aug 2002
            • 9741

            #6
            I think the trouble with trying to be too clever with the File.OpenEmail action, is that how successful you are will depend on the capabilities of the email client.
            CWRIGHT is wright, errrr, I mean right... :yes

            Comment

            • alexr
              Forum Member
              • Apr 2005
              • 4

              #7
              Thank you for the response(s). I am obviously trying to rely on the "ease of use for non-programmers" of AMS5.

              As to the email client(s). The app will be distributed to all desktops of a single organization, using Microsoft Outlook and mailing to a single external destination using Microsoft Outlook.

              I will study the included code you suggest and see what I learn........


              alexr

              Comment

              Working...
              X