cancel
Showing results for 
Search instead for 
Did you mean: 

How to send report mail so that report details will be display in mail body ?

SOLVED
Highlighted
Regular Contributor

How to send report mail so that report details will be display in mail body ?

How can I send report mail, so client no need to open mht or html file.
All result will be displayed on that mail body.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: How to send report mail so that report details will be display in mail body ?

if you look the Smartbear example, ALogData is furnished, by analysing each row of the log (Log is a tree-table  object).

You can find its call on the ExportRow() function.

 

Add all of the code of the example into a project and call ExportLog() before exiting, beware that the export can take a loooong time if the log is big. It creates one jpg for each screencapture and a text file.

 

Un sourire et ça repart

View solution in original post

5 REPLIES 5
Highlighted
Community Leader

Re: How to send report mail so that report details will be display in mail body ?

Three ways:

  1. -Do yourself the body by building a global result string containing all logs strings you want and only them; very easy to implement, put your own content; but this is not the Log itself only your own logging system..
  2. - Convert MHT using external tools and command line call, example of tool :  https://www.coolutils.com/Convert-MHT-Text  ;  dont touch your code, having any kind of type content; but need external tools and could slowdown the test process by adding extra time
  3. - Use the log items propety, https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/from-tests.html ; the best but need a little extra code

 

 

 

Un sourire et ça repart

Highlighted
Regular Contributor

Re: How to send report mail so that report details will be display in mail body ?

Hi @BenoitB ,

Thanks for reply.

I am trying to fix this by 3rd option.

There are several methods have parameter like ALogData---> you can check in below function

what is that parameter exactly. Can you please help

 

Sub ExportPicture(ALogData)
' Generating the image file name
ImgCount = ImgCount + 1
s = aqFileSystem.GetFileFolder(ExportFileName) + "\" + CStr(ImgCount) + ".jpg"
' Saving image to file
ALogData.Picture.SaveToFile s
' Saving image file name to the log data file
ExportFile.WriteLine "Picture: " + s
End Sub

Highlighted
Community Leader

Re: How to send report mail so that report details will be display in mail body ?

if you look the Smartbear example, ALogData is furnished, by analysing each row of the log (Log is a tree-table  object).

You can find its call on the ExportRow() function.

 

Add all of the code of the example into a project and call ExportLog() before exiting, beware that the export can take a loooong time if the log is big. It creates one jpg for each screencapture and a text file.

 

Un sourire et ça repart

View solution in original post

Highlighted
Regular Contributor

Re: How to send report mail so that report details will be display in mail body ?

Hi @BenoitB ,

Thanks... It's working

have one more query.  It iterates through the project logs and saves their contents to a text file. but now as per my query i want details in mail body. What i need to  do.

Store that text file data in a string adn then call sendmail() function and put that string as parameter in message body?

 

 

 

Highlighted
Community Leader

Re: How to send report mail so that report details will be display in mail body ?

Yes

All which is ExportFile.WriteLine(value) becomes a myString += value

For image you must manage attachments on your email

 

 

Un sourire et ça repart

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors