NetTalk Central

Author Topic: Trying to use EmailHtmFile to send automatically  (Read 4549 times)

Jim A

  • Full Member
  • ***
  • Posts: 203
    • View Profile
    • Email
Trying to use EmailHtmFile to send automatically
« on: May 18, 2015, 08:39:03 AM »
Hi All:  I have an old app in C55 that sends out Inventory Specs with pictures via Nettalk.  It works fine with the simple html that the app generates -- all pictures are given a CID: reference, adding to embedlist, etc.

What I want to do is to generate a template driven email, save that as an html file and let File Explorer do the heavy lifting of converting that html page into an email per the EmailHtmFile example.  FE takes care of Inlining the css for you which is super cool (Thanks Capesoft).

I generated the example in C9.1 and it works fine when I load the html page manually with the lookup button for FileDialog.  When I try to automate the process and assign the path and filename and not use FileDialog, it sends but doesn't seem to pick up on all of the css references because the formatting is way off.

The code for the lookup (when done manually) is:

if FileDialog('Select a file to email...', htmlFileName, 'HTML Files|*.html;*.htm', File:KeepDir + File:LongName)
    Display(?htmlFileName)
end

I've tried a number of different things but no joy.

Until I can move the C55 app to a newer build, I'm planning to use nettalk to pass the needed parameters to the EmailHtmFile app in C9.1.  I don't want any user interaction.

Any ideas why the one works and the other fails?  Is there a better way to accomplish this? With StringTheory, would I even have to write this to disk first?

Thanks,

Jim