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

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Back to top!