Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to deal with this.. Big String on HTML to outlook
Message
 
To
27/08/2004 11:07:10
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00936589
Message ID:
00937179
Views:
18
Just create a string, dump to file (use STRTOFILE) then point ShellExecute at the file to pop up outlook. As long as the file has an EML extension OE should pop up the emial.

Now the main problem will be that you have to configure OE - if you're using Outlook OE won't be already configured.

Frankly though, you should use some other mechanism if you want to send email, especially something that is more than just a mere notification (if you're sending 2k or more it sounds like you're sending real data!).

I would suggest you look into sending the email directly out of your app using an SMTP component like CDO or like West Wind Internet Protocols.

+++ Rick ---

>>ShellExecute() is limited to 255 characters (or somewhere thereabouts) the parameter so you have to be careful with how much data you stuff in there. There's no way to work around this directly.
>>
>>However, you can use Outlook Express by creating an EML file like this:
>>
>>
>>From: rstrahl@west-wind.com
>>To: rstrahl@west-wind.com
>>Subject: Hello World
>>X-Priority: 1
>>X-Unsent: 1
>>
>>the quick brown foxthe quick brown foxthe quick brown foxthe quick brown
>>
>>
>>and it will pop up Outlook Express with the full message regardless of size. I suspect Outlook would work too but you'd have to swap the OS mapping for the EML file. Bears experimenting.
>>
>Hi Rick
>
>Thanks for your repli..
>
>How can I deal (programactly speaking) with this EML file.. I mean, do you have any sample or point me to any link.. To make me understand it a little better..
>
>Claudio
>
>>
>>
>>>Hi,
>>>
>>>My goal is to send e-mail using a HTML report watched by user..
>>>
>>>the len() of ThisForm.olehtml.document.Body.innerHTML is more than 2k of characters, and outlook is getting only part of it.. And the HMTL code is truncaded..
>>>
>>>
>>>Declare INTEGER ShellExecute ;
>>>    IN SHELL32.DLL ;
>>>        INTEGER nWinHandle,;
>>>        STRING cOperation,;
>>>        STRING cFileName,;
>>>        STRING cParameters,;
>>>        STRING cDirectory,;
>>>        INTEGER nShowWindow
>>>if  used("cur_email")
>>>    sele cur_email
>>>    use
>>>endif
>>>SELE 0
>>>CREAT CURSOR cur_email (ctipo C(1), lcMessageBody m)
>>>append blank
>>>
>>>cwTo           = ""
>>>lcEmailAddress = cwTo
>>>lcCCAddress    = ""
>>>lcSubject      = "Report by " + allt(empresa.empresa)
>>>
>>>repl lcMessageBody  with '<html>' + ThisForm.olehtml.document.Body.innerHTML+'</html>'
>>>
>>>m.filehtm      = "resumo_pronto.htm"
>>>
>>>ShellExecute(0, "", "mailto:" + lcEmailAddress + "?Subject=" + lcSubject + "&body=" + cur_email.lcMessageBody + "&cc=" + lcCCAddress, "", "", 1)
>>>if  used("cur_email")
>>>    sele cur_email
>>>*    use
>>>endif
>>>
>>>
>>>Any advice will be welcome.. TIA
>>>
>>>Claudio
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform