Skip to main content
New Participant
May 29, 2020
Question

How to send an email using mail server with a .pdf attachment

  • May 29, 2020
  • 2 replies
  • 1142 views

I want to know how to code up something using javaScript that would email a pdf document without having to use an Outlook account or webmail account instead we gonna use our own mail server.

This topic has been closed for replies.

2 replies

try67
Braniac
May 29, 2020

As mentioned, this can be done using a server-side script, for example in PHP.

If you're interested I can create such a script for you (for a fee) and help you install it, as well as edit the PDF file to submit the data to it, and even display a message letting the user know if it worked or not. You can contact me via [try6767 at gmail.com] to discuss it further.

Thom Parker
Inspiring
May 29, 2020

While Acrobat can connect to an arbibrary email server, there's nothing in Acrobat JavaScript that would allow you to directly talk to an email server from a document script. 

To do this, the document would need to submit to a server script, that would email the PDF.  This is actually quite easy to do with PHP or ASP.NET.  

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
New Participant
May 29, 2020

Do you have any references to do that what you said?

Thom Parker
Inspiring
May 29, 2020

You mean sending an email from PHP or ASP.NET?  To do this at all you would need a resource to develop server side scripts. Such a resource would know how to do it. 

If you are interested in doing it yourself. PHP is quite easy to work with, and it's amost a sure thing that PHP is already available on your server and can easily access your email account. I'd suggest trying out one of the online tutorials. Just google "learn PHP".

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often