Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mail sending through Outlook Express

87 views
Skip to first unread message

Sharma@discussions.microsoft.com Ajay Sharma

unread,
Jan 12, 2010, 1:18:01 AM1/12/10
to
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

Al Dunbar

unread,
Jan 12, 2010, 1:45:08 AM1/12/10
to

"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

Reventlov

unread,
Jan 12, 2010, 5:17:04 PM1/12/10
to

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)
--

0 new messages