# Email question on Action.Body

**URL:** https://www.finalbuilder.com/forums/t/email-question-on-action-body/600
**Category:** Discussion
**Created:** [October 2, 2007, 10:14am UTC](https://www.finalbuilder.com/forums/t/email-question-on-action-body/600 "2007-10-02T10:14:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 2, 2007, 10:14am UTC](https://www.finalbuilder.com/forums/t/email-question-on-action-body/600/1 "2007-10-02T10:14:18Z")

</div>

Greetings all.&nbsp; Looking for some help on sending email.&nbsp; I'd like to update the body of the email to include the lines of a txt file, instead of attaching the text file to the email message.&nbsp; I'm using an external app to generate a log file, and its annoying to have to open up the attachment to view the lines inside of it, would be cleaner if I could put the log lines into the body instead.

I thought there'd be a way in the VBscript to do something like the following, but its not adding the lines (yes, the log does contain info).

&nbsp;

Dim objFSO, objTextFile  
Set objFSO = CreateObject("Scripting.FileSystemObject")  
Set objTextFile = objFSO.OpenTextFile("C:\Temp\dbdiffresults.log", ForReading, True)

Action.Body = objTextFile.ReadAll

objTextFile.Close

Thanks in advance,

&nbsp; Rich W.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 3, 2007, 1:53am UTC](https://www.finalbuilder.com/forums/t/email-question-on-action-body/600/2 "2007-10-03T01:53:56Z")

</div>

Hi Rich   
  
 The problem seems to be that the constant ForReading is not registered with the script engine (I’ll look into that). If I use this code it works fine :   
  
 Set objTextFile = objFSO.OpenTextFile(“C:\Temp\dbdiffresults.log”, 1, True)   
  
 HTH

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 3, 2007, 3:18am UTC](https://www.finalbuilder.com/forums/t/email-question-on-action-body/600/3 "2007-10-03T03:18:18Z")

</div>

Yup, that did the trick - thanks much!
