Using an IIS Server

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\joey.txt", True)

a.writeline ("x-sender: joey_deacon@hotmail.com")
a.writeline ("x-receiver: x@y.com")
a.writeline ("From: joey_deacon@hotmail.com")
a.writeline ("To: x@y.com")
a.writeline ("Subject: Whatever")
a.writeline ("")
a.writeline ("Dear Joey" & Chr(10) & Chr(13) & "You're the Greatest")
a.Close
strMail ="\\vinters\c$\Inetpub\mailroot\Pickup\joeyemail.txt"
fs.CopyFile "c:\joey.txt", strMail

Or you could replace the fs.Copyfile with the FileCopy statement, and the a.writeline with print # and avoid a reference to an external dependency.

[ EmailAccess | Main ]