Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
5 years ago

Able to send mail for log data through script but confused in path for file location.

I am executing test items and in the last of queue Email Test cases is there to send reports.

but problem is in Sendmail() function we need to provide parameter for file location. so this function will get that file and will send to respecttive userID. 

My question is if I am providing file location details like "C:\Users\KO\Music\file1.mht" 

then will it overide the log data here whenever I will execute my test items. if not then how i will be able to send my log data after test item execution.

Hope you get my point.
Please guide.

6 Replies

  • Wamboo's avatar
    Wamboo
    Community Hero

    I don't understand what you want to do. Are you asking me:

    1) The file you send to the disk will be deleted after you perform SendMail()?
    2) Do you always want to take only the latest log file to sendMail()?

    • BenoitB's avatar
      BenoitB
      Community Hero

      For these cases i built a path test\date based name and export to this path and i send mail the exported log.

      The exported log contains also timestamp.

       

      testexecute.mht -> exported to \results\myApp\03-19-2020\myAPP03-19-2020-100005.mht

       

      But as Wamboo  i dunnot understand clearly what u want.

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        BenoitB is correct.... you best practice would be to make sure that your MHT file has a unique name each time it's created.  That will prevent over-writing/replacement.