Hi!
OK I have tried to get this working but I am not getting anything. I can execute the script with no errors, but I don't recieve an email to the test account.
Here is the script with my info. Am I doing this right? I don't have a lot of experience with VB script.
Function MailScript(sSubject,sPathfile)
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Dim strMessageBody
Const cdoSendUsingPort = 25
StrSmartHost = "mail.irvine.local"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' set the CDOSYS configuration fields to use port 25 on the SMTP server
With Flds
.Item("
= cdoSendUsingPort
.Item("
= strSmartHost
.Item("
= 100
.Update
End With
' apply the settings to the message
With iMsg
Set .Configuration = iConf
.To = "pendarus@mindspring.com"
.From = "barneye@inductor.com"
.Subject = "test"
.TextBody = "test"
.AddAttachment "U:\Invsum\Parthunter\inductors_same_day.xls"
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
End Function ' MailScript
Thanks!