Expand my Community achievements bar.

SOLVED

Don't send any XML/PDF/data with an email PLUS send encrpyted data

Avatar

Level 3

Is it possible to send an email on submission of a form WITHOUT actually sending the XML/PDF/data? In other words, a User completes a form, clicks Submit & then creates an email thanking them for submitting their details.

I know what you're thinking - what's the point of that? - well, the majority of the data in the form that I'm producing is not needed just a few pieces of the data which I can quite easily put into the body of the email.

To go the other way, I can grab the XML of the completed form using xfa.data.saveXML() and then encrypt it, but how do I then attach the encrypted data to the outgoing email INSTEAD of the original un-encrypted XML?

Thanks

Message was edited by: iamthewalrus@adobe

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

You could just script to send an email:

var vEmail = "email@address.com";

var vSubject = "A Subject for your email";

var vBody =  "Put your body message here...";

event.target.app.mailMsg({

bUI: true,

cTo: vEmail,

cSubject: vSubject,

cMsg: vBody

});

The vBody variable could be constructed to include (non-null) data from the form.

Hope that helps,

Niall

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

You could just script to send an email:

var vEmail = "email@address.com";

var vSubject = "A Subject for your email";

var vBody =  "Put your body message here...";

event.target.app.mailMsg({

bUI: true,

cTo: vEmail,

cSubject: vSubject,

cMsg: vBody

});

The vBody variable could be constructed to include (non-null) data from the form.

Hope that helps,

Niall

Avatar

Level 3

Niall,

Perfect solution for the first part of my question.

Thanks,

Avatar

Level 5

Is it possible to tailor the vBody variable to inlcuded styling? I have heard you can style using XML in an email (which doesn't make sense to me since my understanding of XML is it is for data transfer). Or style using Javascript?

Otherwise the email body come out in Plain Text.