Copy link to clipboard
Copied
Hi, I am creating a contact us form which I need to pull info from and send to several emails; however, I do not want the email client to open into a compose message. I just want the info sent to those emails specified.
Here is the code I currently have:
var cMyMsg = this.getField('Name').valueAsString + " has a " + this.getField('Category').valueAsString + " that is " +
this.getField('Severity').valueAsString + ". " + "Description of " + this.getField('Category').valueAsString + ": " + this.getField('Description').valueAsString;
app.mailMsg({ bUI: true,
cTo: "123@email.com",
cSubject: this.getField('Category').valueAsString + " regarding PA Coversheets",
cMsg: cMyMsg } );
I currently have an text field set up for Email_Address. I need the form when submit is clicked to send email from that address to the emails I specify in the code without having the email client open.
Please help. Thank you.
I have it as a mouse up event that runs a javascript. I changed the BUI to false. and that did the trick. Thanks.
Copy link to clipboard
Copied
As is documented in the API, you'll have to run the script from a privileged context to be able to do that, ie from a folder-level script.
Copy link to clipboard
Copied
I have it as a mouse up event that runs a javascript. I changed the BUI to false. and that did the trick. Thanks.
Copy link to clipboard
Copied
It should not have done. This parameter should have been ignored when you run this code from a button.
It's not possible to do that with attachments. But if a file is attached to the main PDF just submit the PDF itself and it will be sent along with it.
Copy link to clipboard
Copied
I opened the file in internet explorer. But how would I get it to work on the form (if at all possible) if say I save the form as reader extended and users open it with reader. If they click the button will it always open the email client regardless?
Copy link to clipboard
Copied
AFAIK, yes.
Copy link to clipboard
Copied
You wouldn't happen to know how to add attachments to a form and have those attachments attached to the email would you? try67
Find more inspiration, events, and resources on the new Adobe Community
Explore Now