View Full Version : FmEncoder + HTMLTemplate?

12-Nov-2005, 01:08 AM
I have FormMail and fmbadhandler.php working smoothly. I set up FMEncoder/DEcoder and it works, but it seems that all my work setting up nicely formatted HTMLTemplates is for naught, since FMEncoder only seems to send the field names and the actual data.

Do I have to choose between encoding the emails or using HTMLTemplates for the emails? Is there a way to have both...I mean in the same email? Would this create a huge email, or too much server load having to encode such a file?

I hope I just missed a setting somewhere. :D . My system sends an online order form to my company's email and I wanted it formatted well so the office people could simply print the file and have a nice work-order without any extra work.


12-Nov-2005, 01:38 AM

FormMailDecoder doesn't yet support HTML formatting.

However, your work is probably not wasted, unless you want *every* field encrypted.

For example, on our order form, only the sensitive fields are encrypted. Things like the person's name, the product they've ordered, etc., are not sensitive, so we don't encrypt them.

So, we generally have a nice HTML email containing the non-encrypted fields, and then use a PlainTemplate to provide some formatting for the encrypted fields.

We then tell FormMail to attach the encrypted data to the email, and we receive an HTML email with an attachment. We double-click the attachment to decrypted the sensitive information, which has been formatted with a Plain text template.

Hope that helps.

12-Nov-2005, 02:46 AM
That's good to hear. I don't really need to encrypt every field. Just payment info. I didn't even realize it was possible to separate the form in that way. I'll dig deeper into the documentation.


13-Jul-2006, 01:46 AM

I do need to encrypt the entire contents of an HTML template. Is there any ETA on this feature being available?
I have done some initial digging into the code and I have a great amount of respect for the amount of work that went into your script.
I have illusions of being able to add this feature myself, even though I've only been PHP scripting a few months. I know there are probably reasons why this feature is not yet available. Could you elucidate any potential gotchas that have prevented you from adding filter support for HTML templates? Could you also point me to where the HTML template is put after construction and before attaching it to a MIME message?
If I can get it to work I'll definitely do my best to document and return my work to you and the community. Many thanks for a very useful script!

Best Regards,

13-Jul-2006, 03:22 AM

The issue isn't FormMail. FormMail works fine with HTML templates and sending HTML emails.

The problem is FormMailDecoder. It decodes whatever has been encrypted, but it only knows how to deal with text. It displays text.

If you encrypt HTML then, when FormMailDecoder decrypts it, it shows you the raw HTML - you see the HTML tags. It doesn't display the HTML formatted.

In short, FormMailDecoder doesn't currently know how to display HTML as formatted HTML.

ETA is later this year or early next year. Most people don't need it, so we're focussing on other issues for the time being.

17-Jul-2006, 11:53 PM
Hi Russell,

Thank you for the quick response. I was hopefull that I could run my HTML template through a custom filter. However, the data coming into my filter is text name value pairs only, even though my form is configured to send HTML only. Am I doing something wrong?

<input type="hidden" name="mail_options" value="HTMLTemplate=app.html,TemplateMissing=N/A,NoPlain" />

18-Jul-2006, 12:52 AM
To obtain Technical Support directly from the author of FormMail (me), you need to purchase a Subscription.

There are a range of Subscription options available. Please click this link for further details:

Once you've purchased a subscription, you can post questions on the Support Forum and we will answer them ASAP. The FormMail Support Forum is here:

You can search for answer to your question on this same Forum *without* purchasing a subscription. There's an almost 100 percent
chance your question has been asked before, and you should be able to find the answer.