08-22-2008, 07:15 PM
Hi,
Use the below function it works fine...
Thanks
-Ashok
Use the below function it works fine...
Code:
Function SendMail(SendTo, SendCC ,Subject, Body, Attachment)
Set ol =CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
mail.cc = SendCC
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
Mail.Send
ol.Quit
Set Mail = Nothing
Set ol = Nothing
End Function
Thanks
-Ashok