I have a sendmail dll written in VB that may be of use to you, drop me an email and I'll pass it onto you.
[sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href=
If you have some example code for that it would make a great FAQ entry. [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href=
Thanks guys,
Simon - I've looked at the Outlook object model and have actually figured out out to send a mail(!). I'm having problems though with the Attachment property. What syntax should I be using? The following code gives me an error message when I get to Attachments.....
The attachments property of the mail item is a collection of attachments, so you have to do:
Set myAttachments = oMail.Attachments
and then use the add method of myAttachments to add a file attachment:
myAttachments.Add(Source, [Type], [Position], [DisplayName])
so your line will be:
myAttachments.Add [sig][/sig]
Set SendMail = CreateObject("Outlook.Application"
Set mail1 = SendMail.CreateItem(0)
mail1.Subject = "Files found in directory :"
mail1.Recipients.Add (EmailList)
mail1.Body = "There was a total of " & Count & " files found in the directory " & gDirPath & "." _
+ vbCr + FilesFound
mail1.Send
MsgBox "Message sent from FTPNotify program"
Set mail1 = Nothing
Set SendMail = Nothing
I have only just looked at my last post and realised that all that I wanted to post didn't actually get posted (I did type more than was actually posted, honest!) - but I guess it doesn't matter now.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.