| Dart Home | PowerTCP Mail for ActiveX | Custom Development | Reply | PowerTCP Mail for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Mail for ActiveX Topic: Check for attachments |
| User171 Posts: 1 Member Since: 03/21/02 |
posted March 21, 2002 6:57 PM Hi, I'm trying to write a VB6 app to check for then download only specific attachments, jpg files - any other emails will be forwarded to another address. I seem to be having problems with checking for attachments within the email. Is there anyway that this can be done? Any pointers to completing this would be great. Cheers. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted March 22, 2002 12:19 PM Hi, You can check the message parts for a Content-Disposition: attachment header. Below is a simple routine that prints out the names of all the attachments in a message. -ken Dim p As New Part For Each p In Smtp1.Message.PartList s = p.Header.Find(msgNull, "Content-Disposition: attachment; filename=""") If Not s = "" Then s = Mid(s, 1, Len(s) - 1) 'remove ending quote Debug.Print "FileName: " & s End If Next K M Drake Dart Tech Support |
| Reply | PowerTCP Mail for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|