Wednesday, November 02, 2005

send mail script

'
'
' Send Mail from Command prompt
'
'
set imsg = createobject("cdo.message")
set iconf = createobject("cdo.configuration")

Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mailrelay.pha.phila.gov"
.Update
End With

With iMsg
Set .Configuration = iConf
.To = "murali.vanamamalai@pha.phila.gov"
' .To = "vmurali@technologist.com"
.From = "Admin@pha.phila.gov"
.CC = " "
.Subject = "this is a test "
.TextBody = "test success."
.fields.update
.Send
End With

set imsg = nothing
set iconf = nothing

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home