Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Send email without having email client open? (need for work)

Participant ,
Jan 28, 2016 Jan 28, 2016

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.

TOPICS
Acrobat SDK and JavaScript
944
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jan 28, 2016 Jan 28, 2016

I have it as a mouse up event that runs a javascript. I changed the BUI to false. and that did the trick. Thanks.

Translate
Community Expert ,
Jan 28, 2016 Jan 28, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 28, 2016 Jan 28, 2016

I have it as a mouse up event that runs a javascript. I changed the BUI to false. and that did the trick. Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2016 Jan 28, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 28, 2016 Jan 28, 2016

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2016 Jan 28, 2016
LATEST

AFAIK, yes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 28, 2016 Jan 28, 2016

You wouldn't happen to know how to add attachments to a form and have those attachments attached to the email would you? try67

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines