Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SMTP Event Sink - email within an email
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
SMTP Event Sink - email within an email
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01436380
Message ID:
01436380
Vues:
110
Hi All,

Still working on this SMTP Event Sink archive but have hit a bit of a problem that I could do with a bit of help with at the moment.

When an email in received which contains another attached email I see how to access the attached email. cdoContentMediaType="message/rfc822".
Registered with:
cscript smtpreg.vbs /add 1 onarrival SMTPEventSink SMTP.EventSink "RCPT TO=*"
PROCEDURE ProcessMessage
	LPARAMETERS toMsg, tnEventStatus, tnParentId
	WITH toMsg
		* This loop works fine
		FOR EACH loField in .Fields		&& fails because .Fields does not exist
			lcField=loField.Name+": "+TRANSFORM(loField.Value)
			lcFieldList=lcFieldList+lcField+CRLF
		ENDFOR

		FOR EACH loAttachment in .Attachments
			lcMediaType = loAttachment.fields.item(cdoContentMediaType).value
			lcFileName = loAttachment.fields.item(cdoAttachmentFilename).value
			IF LOWER(lcMediaType) = "message/rfc822" AND ISNULL(lcFileName)

				* loStream.SaveToFile('00.eml') - fails

				loStream = loAttachment.GetStream()
				FOR EACH loField in loStream.Fields		&& fails because .Fields does not exist
				ENDFOR

				loContentStream = loContentStream.GetDecodedContentStream()
				FOR EACH loField in loAttachment.Fields		&& again fails because .Fields does not exist
				ENDFOR

			ENDIF
		ENDFOR
Any suggestions how I can attack this problem, is there any known way to persist this object so that I can examine it's objects and collections?
Répondre
Fil
Voir

Click here to load this message in the networking platform