Tuesday, February 12, 2008

Program to send E-mail through VBScript

Function SendMail(SendTo, Subject, Body, Attachment)
Set ol=CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
Mail.Send
Set Mail = Nothing
Set ol = Nothing
End Function
Call SendMail(("adityajoy58@gmail.com;kalyan_kudapa@adp.com"),"hi","HI This is Aditya","") //

No comments: