Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why do I need to open outlook to send e-mail, part II ?
Message
From
23/06/1999 18:54:40
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00231324
Message ID:
00233265
Views:
40
PMFJI but I've also been working with sending email from within VFP. In my experience so far, using MAPI takes awhile to send the email. However, manipulating Outlook directly (CreateObject("Outlook.Application")) is really fast, IF I have Outlook open. However, using Outlook, I can't figure out how to bring up the email to be sent BEFORE sending it.

Iain, how fast does your computer send the email?


>this is my code, for doing internal mail with outlook, and attachments, this is in the click property, of a form with the OLE controls on the form
>
>
>*-this Method creats an email, it attaches the required data
>*-progmaticly
>select mailtosend
>
>copy to array paAttchFiles fields name for NOT mailtosend.done && copy file names to an array
>
>*copy to array paAttchFiles fields mailtosend.done for not mailtosend.done  && copy file names to an array
>thisform.OLESessionCtrl.Signon	&& Creat the logon session
>with Thisform.OleMessageCtrl
>	.SessionID = Thisform.OleSessionCtrl.SessionID	&& get the next ID no
>	.Compose	&&compose an email in memory
>	.RecipAddress = 'Iain Brodie'	&& address it to me
>	.ResolveName	&& Let system find out the proper address
>	.msgIndex = -1	&& set the Message Index count
>	.msgsubject = alltrim(pcclientsname)	&& Put client name as the Subject
>	.msgnotetext = "    Please Put on disk for Lewis Alcraft"	&& put this in the main body of message
>	AttachmentDone=1	&& Creat a counting varible for the Attachment counter
>
>	*-this for loop counts how many files there are to be attached
>	*-for each file name there is two files to be attached
>	for lncount = 1 to alen(paAttchFiles)
>		.AttachmentIndex = AttachmentDone -1
>		.AttachmentPathName = (pcclintspath+'download\'+paAttchFiles(lncount)+'SO.dbf')
>		.Attachmentposition = AttachmentDone -1
>		AttachmentDone=AttachmentDone+1
>	endfor
>
>endwith
>*set step on
>with thisform.OleMessageCtrl
>	.send(1)	&& show predefined email with fields filled in
>endwith
>*-this part sets the flags on the data, so we do not get duplicate files
>select mailtosend
>for i = 1 to alen(paAttchFiles)
>	loca for mailtosend.name=paAttchFiles(i)
>	replace mailtosend.sentdate with datetime(), mailtosend.done with .T.
>endfor
>thisform.release
>
>
>
>HTH
It's "my" world. You're just living in it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform