Searching...

Sending a text email with an attachement

By repeating the .AddAttachment method you can attach more than one file. When attaching files keep in mind that your recipient may be limited in their ability to receive files above a certain size. Many ISPs limit emails to 8 or 10MB each.
 




Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "me@gmail.com"
objMessage.To = "test@gmail.com"
objMessage.TextBody = "This is some sample message text."
objMessage.AddAttachment "c:\temp\test.txt"
objMessage.Send

0 comments:

Post a Comment

 
Back to top!