This is the basicest of a ".eml" file, but like so: (I stopped the smtp
service while doing this 10,000 times...)
Sub GenerateByFSO(NumberOfMessages)
Dim i
Dim oFSO, oFile
Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
For i = 1 To NumberOfMessages
Set oFile = oFSO.CreateTextFile("C:\Inetpub\mailroot\pickup\msg" & CStr(i)
& ".eml")
oFile.WriteLine "X-Receiver: (e-mail address removed)"
oFile.WriteLine "X-Sender: (e-mail address removed)"
oFile.WriteLine "To: <
[email protected]>"
oFile.WriteLine "Subject: Test FSO"
oFile.WriteLine vbCrLf
oFile.WriteLine "Test e-mail FSO"
oFile.Close
Set oFile = Nothing
Next
End Sub
It would have been a bit speedier (I'd imagine) to generate on string with
vbCrLfs and then doing only one .write on the file.
Ray at home