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

Sending Email

zeeshanhashmi
Registered: Jan 2 2008
Posts: 58

hi

In my PDF, i want to add an ability to send an email to a predefined address when the file was opened.

I think this can be done via Javascript at the File Open event. Please guide me if this is ok, and also please put a sample code to send email via javascript in pdf.

Thanks
Zeeshan

suewhitehead
Registered: Jun 3 2008
Posts: 232
You can put a document-level script on the form that will open a new email when the form opens. However, remember that the form will not yet have any data entered into it at that point. Also, the user would still need to hit the SEND button in their email client.

Here is the script. You can change the email address(es) and message, etc to fit your situation.

//doclevel script to send email on form open
//named MailDoc

this.mailDoc({
bUI: false,
cTo: "apstory [at] example [dot] com",
cCC: "dpsmith [at] example [dot] com",
cSubject: "The Latest News",
cMsg: "A.P., attached is my latest news story in PDF."
});