Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending an Email from VFP
Message
 
 
To
08/06/2006 22:03:02
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000
Miscellaneous
Thread ID:
01128024
Message ID:
01128026
Views:
19
...
  .Display()
>I have developed the code below for sending an email from VFP using Outlook:
>
>#DEFINE OLMAILITEM 0
>#DEFINE CR CHR(13)
>#DEFINE OLCC 2
>OOUTLOOK = CREATEOBJECT("outlook.application")
>OMAILITEM = OOUTLOOK.CREATEITEM( OLMAILITEM)
>
>WITH OMAILITEM
>	.SUBJECT = "News"
>	.BODY    = "The quick brown fox jumped over the lazy dog" + CR +;
>		"The quick brown fox jumped again."
>	* add recipients
>	WITH .RECIPIENTS
>		.ADD ("Mike Smith")
>
>		* ADD COPIES
>		ORECIP = .ADD("Mike Smith")
>		ORECIP.TYPE = OLCC
>
>		* get outlook to add all the email addresses
>		LRESOLVED = .RESOLVEALL()
>	ENDWITH
>	.ATTACHMENTS.ADD ("C:\TEMP\TEST.JPG")
>
>	* save and send
>	.SAVE()
>	*.SEND()
>ENDWITH
>
>
>I am trying to simply put this into the Outbox but not send it. I have starred out .SEND() but this code sends it anyway.
>
>How do I simply put the email into the Outbox so the user can look at it before sending?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform