"Ajay Sharma" <Ajay Sha...@discussions.microsoft.com> wrote in message
news:BA689A66-6E0C-4EA2...@microsoft.com...
> I want to send the mail thro' vb code using outlook express , but I am not
> able to send it. It is sending only thro' Microsoft Outlook
Outlook Express does not have a programmable interface. How does your
current script work? and is it VBScript or VB?
/Al
This is a workaround to use OE to send mail.
Anyway, using Outlook or Blat allows more control.
'Zhang Weiwu (family name first)
Dim sTo, sSubj, sMsg, sleepdelay
set oShell = CreateObject("WScript.Shell")
Set fs = CreateObject("Scripting.FileSystemObject")
Set txt = fs.OpenTextFile("message.txt")
' message.txt in the same vbs folder
sTo = "som...@somwehere.org"
sSubj =now()
sMsg =txt.ReadAll()
sSubj= escape(sSubj)
'sMsg= escape(vbNull & sMsg)
oShell.Run "mailto:" & sTo & "?subject=" & sSubj & "&body=" & sMsg
wscript.sleep 2000
'oShell.SendKeys "^~"
''' remove ' above for immediate sending
--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--