Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pull email attatched PDF

Status
Not open for further replies.

tswitz00

IS-IT--Management
Jan 26, 2005
67
US
I am not sure if php is the correct language for this possibly perl maybe you guys can help me out...

My question is I have emails coming to a specified email address on our server with an attached PDF. What I need to do is whenever that email makes it to our server I need to pull off the PDF attachment base64 encode that PDF and send it off through a web service. And this all needs to be done automatically.

Is this possible? A point in the right direction would be very appreciated. Thanks.
 
Although I've never done this type of work before, I do not see a problem getting the desired results using PHP. There is a c-client library you can install and compile with PHP provide an assortment of IMAP, POP3 and NNTP Functions (more information).

Sorry I cannot provide more specific information, but maybe someone else can.
 
pretty sure you can use php for this. there is a library for handling mail retrieval.

but - i'm sure that there must be automated mail event trigger daemons that are prebuilt for this kind of task.

you might also take a look at the mail_mime pear class for easy decoding.
 
I found a great example to do exactly what I need but I am getting an "Call to undefined function: imap_open()" error message.

So I did some checking and they say you need to compile php with IMAP support, so I checked my phpinfo() and it appears to have been configured with --with-imap-ssl=../imap-2001a .

Is that version to old to support imap_open()? I guess the latest stable version is 2001e.

Any thoughts? Do I need to try to upgrade to the latest version? Or am I missing something else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top