Find Jobs
Hire Freelancers

PHP e-mail reader

$30-100 USD

Completed
Posted over 14 years ago

$30-100 USD

Paid on delivery
We need a small PHP command line script that reads a POP3 account and extract attatchments and saves them to a folder. The code should be in a function so that the script is easy to include and call from other scripts. ## Deliverables We need php command line script containing with a function that: 1) Logs on to a POP3 account and download messages one by one 2) If the message contains an attachment with a specified name, it should be stored to a folder. A number must be added to the file to be sure it is unique and an existing file with the same name is not overwritten. 3) The function should return an array containing the names of all stored files This should be the name the file is saved with, not the original name of the file. 4) All the mails from which a file is saved, should be marked as read and deleted from the POP3 mailbox so that a file is never saved twice. 5) Code shoud be well documented so that is easy for another coder to understand what the code is doing. Example PHP code: <?php $file_names = download_attachments('[login to view URL]', 'name', 'pwd', '[login to view URL]', '/tmp/'); echo "Saved files: \n"; foreach($file_names as $file_name){ echo $file_name . "\n"; } function download_attachments($pop3_server, $pop3_user, $pop3_password, $attachment_filename_regex, $save_to_folder){ ? ? //Log on server ? ? ? ? ? //Iterate through messages: ? ? ? ? ? //If attachment exixsts and attachment filename match $attachment_filename_regex : ? ? ? ? ? ? //If filemname already exists in folder: ? ? ? ? ? ? //Find a running number to add before the file ending like this ? ? ? ? ? ? //[login to view URL], [login to view URL], [login to view URL] ? ? ? ? //Save attatchment as selected filename ? ? ? ? //Mark message as read/to be deleted ? ? ? ? //Store filename in array ? ? ? ? ? ? //Return array of filenames ? ? ? } ?>
Project ID: 3061727

About the project

6 proposals
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$25.50 USD in 14 days
5.0 (11 reviews)
2.3
2.3
6 freelancers are bidding on average $54 USD for this job
User Avatar
See private message.
$68 USD in 14 days
5.0 (64 reviews)
5.5
5.5
User Avatar
See private message.
$79.90 USD in 14 days
4.8 (34 reviews)
5.0
5.0
User Avatar
See private message.
$85 USD in 14 days
4.7 (23 reviews)
4.5
4.5
User Avatar
See private message.
$42.50 USD in 14 days
5.0 (8 reviews)
3.0
3.0
User Avatar
See private message.
$25.50 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of NORWAY
Norway
5.0
2
Member since Oct 28, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.