Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook Automation and Redemption
Message
From
29/11/2006 19:30:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Outlook Automation and Redemption
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01173539
Message ID:
01173539
Views:
80
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	
Next
Reply
Map
View

Click here to load this message in the networking platform