These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

this.mailDoc not working

kenwarthen
Registered: Jun 27 2010
Posts: 22

I have the following code in a javascript event attached to the mouse up event of a button on a pdf form.

this.mailDoc({
bUI: true,
cTo: "warthenk [at] bellsouth [dot] net",
cCC: "kenwarthen [at] gmail [dot] com",
cSubject: "Test subject",
cMsg: "This is a test to see if the Javascript code will work."
});

When I click the button associated with the code nothing happens. I have the JavaScript Debugger open and nothing displays in the view window when the button is clicked. I can click the button with an email client open or closed. In either case nothing happens. Any ideas on what I'm doing wrong here?

Ken

My Product Information:
Acrobat Pro Extended 9.3.1, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi kenwarthen,

What is the e-mail client you are using ( is it MAPI compliant)? Try going to the File menu and sending it via Attach to Email- what happens?
(Your code works fine for me using Outlook)

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
kenwarthen
Registered: Jun 27 2010
Posts: 22
Dimitri,

Thanks for the help. I've tried the code with Outlook, Thunderbird, and Zimbra, all with the same disappointing results. I tried clicking the Attach to Email item from the file menu. Nothing happened.

Ken
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Not sure if that's the problem, but you got one of the parameter names wrong. It's cCc, not cCC.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

kenwarthen
Registered: Jun 27 2010
Posts: 22
Dimitri,

I changed my Outlook email access type from IMAP to POP3. Then my code worked. I also change the cCc: syntax. It's nice to know it wasn't really the code that was failing, but rather an email configuration. How can I work around this issue, if the enduser has an IMAP or some other email configuration? Thanks so much for taking the time to help.

Ken
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi kenwarthen,

There is no workarouind I know of- MAPI is required for that code to work. Acrobat doesn't really send the email, it just passes it off to the email client and only does it for MAPI configured ones.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com