Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook Automation and Redemption
Message
De
29/11/2006 19:30:19
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Outlook Automation and Redemption
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01173539
Message ID:
01173539
Vues:
81
I'm using Outlook Automation and Redemption to send emails from my program. The email is getting stuck in the DRAFTS folder. This has worked for me with other installs, but for some reason it is not working here:
#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2
oOutLookObject = CreateObject("Outlook.Application")

IF FILE(ADDBS(datacfg.redemp_dir) + "REDEMPTION.DLL") AND datacfg.use_redemp

	SET DEFAULT TO (datacfg.redemp_dir)
			
	oSafeItem = Createobject('Redemption.SafeMailItem') && open redemption
			
	SET DEFAULT TO (TempDir)

	oEmailItem		= oOutLookObject.CreateItem(MAILITEM)
	oSafeMailItem 		= CREATEOBJECT("Redemption.SafeMailItem")
	oSafeMailItem.Item 	= oEmailItem
	WITH oSafeMailItem
		.Recipients.Add(lc_email)
			
		**.To = ALLTRIM(lc_em_adm1) + IIF(EMPTY(lc_em_adm2),"",";" + lc_em_adm2)
		*.To = "mkoop@tamtech.net;mkoop@ordermatepro.com"
		.Subject = pc_subject
		*.Subject = "Sending Email from within Foxpro to multiple recipients and with attachments"
				
		.Importance = IMPORTANCENORMAL
		.Body = pc_Body
				
		*.Body = "I'm now testing sending to multiple recipients in the .To value from within my app and .Attachments.Add("c:\temp\myfile.txt")
		*.Attachments.Add("C:\temp\junk.txt")
		IF FILE(pc_attachment_1)
			.Attachments.Add(pc_attachment_1)
	ENDIF	

				.Recipients.ResolveAll
				.Send
			ENDWITH
			RELEASE oEmailItem
			RELEASE oOutLookObject
			RELEASE oSafeMailItem	
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform