Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: ShowEmail - Embed HTML Report into Email Body?

$
0
0
Re: ShowEmail - Embed HTML Report into Email Body?
West Wind Client Tools
Re: ShowEmail - Embed HTML Report into Email Body?
Nov. 28, 2012
04:16 pm
3NL0YW4EJShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:SteveP
The ShellExecute API is a very simplistic mechanism for pushing parameters to a program via command line. So there are only a limited number of options allowed. Not all email clients support anything beyond the email address actually which is the only required one. All others - you're lucky if it works with your default configured client.

IAC, if you need fine control over email sending then a real email client is the only way to go.

+++ Rick ---



Ah, I use the SMTP Client approach in other areas of my app, so I will use that approach here as well.

Looks like I will need to setup a form that mimics an Email Client to allow for specifying Recipient(s), CC, BCC, Subject, Attachments, and a section for adding comments. I may also use a Browser Control to display the HTML Report at the bottom of the Send Email form. Thanks for the tip/info on ShowEmail. I missed that important piece of info (text only in the body) in the web article.


No can do... the text passed has to be text. You can't create emails this way.

The ShellAPI to do this is pretty much a lucky hack that the OS provides to feed data to another program via parameters.

If you want to build sophisticated emails with HTML content and attachments you need to use an SMTP client to send emails.
Something like wwSmtp will do the trick:

http://www.west-wind.com/webconnection/wwClient_docs?page=_s9001zxj2.htm


This is part of West Wind Client Tools or West Wind Internet Protocols or West Wind Web Connection.


+++ Rick ---



Hi,
I am working with the ShowEmail Function. It works when a simple text string is passed as the Email Body.

I have an HTML Report generated via the VFP Report Listener saved as a .HTM file on disk.
My goal is to embed this report into the Email Body, but having no luck.

I'm using this approach: lcBody = FILETOSTR("HTMLFilePath")

ShowEmail(lcReceipient, lcSubject, lcBody)

When I use the above ShowEmail Command with lcBody set to the HTMLReport string, the Email Client never displays. Is there a way (correct way) to embed the HTML Report into the email body?






Rick Strahl
West Wind Technologies


from Maui, Hawaii

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles