Find Jobs
Hire Freelancers

PHP script to process incoming emails

$800-1600 HKD

Cancelled
Posted almost 8 years ago

$800-1600 HKD

Paid on delivery
Need to have a PHP program under Linux to use IMAP function [login to view URL] to: 1. read an email account 1.1 if there is no new email, exit here 2. loop through each new email, if there is an attachment (an attachment may have multiple files): 2.1 if the attachment is >15 MB: 2.1.1 email the sender back that attachment size is too large 2.1.2 goto 2.3 2.2 check if the email is from a recognized email address (use SQL to query a MySQL database) 2.2.0 record the time of attachment downloaded 2.2.1 if the email is from a recognized email address: 2.2.1.1 download the attachments and save the attachments to a directory (tmp_dir) 2.2.2 if the email is not from a recognized email address: 2.2.2.1 if the total attachment size is >2 MB: 2.2.2.1.1 do not download the attachment 2.2.2.1.2 email the sender back that attachment size is too large 2.2.2.1.3 goto 2.3 2.2.2.2 if the attachment is <2 MB: 2.2.2.1.1 download the attachment and save the attachment to a directory (tmp_dir) 2.2.3 email the sender back that: 2.2.3.1 the attachment is successfully received 2.2.3.2 the size and filename of each attached file 2.2.3.3 time of attachment downloaded 2.2.4 save the details of the email into a database (use SQL to write to a MySQL database), one record for one file in the attachment. E.g. if there are 5 files in the attachment, there will be 5 new records 2.2.4.1 sender email address 2.2.4.2 each filename of the attachment 2.2.4.3 size of each filename 2.2.4.4 time of attachment downloaded 2.3. delete the email from IMAP 3. exit Your PHP program will be run under CRON job every minute. In order to filter bot reply, please submit your bid by stating what 2.2.4.1 above is. Please let me know if you need further information. Below is the skeleton of the code that I have created so far and you are free to change it. <?php // set user to check $strUser = "user@ [login to view URL]"; $strPassword = "123123pwd"; $mail_server = "[login to view URL]" // open $hMail = imap_open ("{$mail_server:993/imap/ssl}INBOX", "$strUser", "$strPassword"); // get headers $aHeaders = imap_headers( $hMail ); // get message count $objMail = imap_mailboxmsginfo( $hMail ); // process messages for( $idxMsg = 1; $idxMsg <= $objMail->Nmsgs; $idxMsg++ ) { // get header info $objHeader = imap_headerinfo( $hMail, $idxMsg ); // get from object array $aFrom = $objHeader->from; // process headers for( $idx = 0; $idx < count($aFrom); $idx++ ) { // get object $objData = $aFrom[ $idx ]; // get email from $strEmailFrom = $objData->mailbox . "@" . $objData->host; print_r ($strEmailFrom); // do some stuff here } // delete message //imap_delete( $hMail, $idxMsg ); } ?>
Project ID: 10926082

About the project

16 proposals
Remote project
Active 8 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
Hello Sir Thank you for detailed project description this description tells full details of project. we are ready to start now . In you project you want a IMAP functionality where we need to read all new email that should be recognized email ID every minute .If attachment is more then 15 mb and >2 mb sender back that attachment size is too large .if it is less than 2 mb then should download the files and insert record in database and sent email back that we got your email successfully Thank you
$800 HKD in 15 days
4.9 (48 reviews)
4.7
4.7
16 freelancers are bidding on average $1,283 HKD for this job
User Avatar
Hi! I have somewhat have something in similar but was done in Python SMTP and imap. The logic is understandable and PHP imap library is straight forward. I look forward to the properties of the database and for your acceptance. This is an exciting project and I won't fail you. Have a great day!
$1,111 HKD in 3 days
5.0 (44 reviews)
6.0
6.0
User Avatar
A proposal has not yet been provided
$1,600 HKD in 5 days
5.0 (63 reviews)
5.7
5.7
User Avatar
HI Reviewed your requirements we can do the task and let you know in our development server Kindly let me know when do you the task completed Thanks Manickavel
$1,555 HKD in 10 days
4.8 (43 reviews)
5.2
5.2
User Avatar
please contact me and i'll do it ASAP for you, regards, Alex.
$800 HKD in 5 days
5.0 (19 reviews)
4.5
4.5
User Avatar
Hey. I got acquainted with the information you supplied. Project zainetersoval. I understand perfectly the essence of the problem. There is a great experience. There is a great desire to work. I would be happy to implement your project into reality. I propose to discuss all the details of your project in more detail, deadlines, budget. I look forward to our cooperation. I'll wait for your answer in the chat.
$2,222 HKD in 10 days
4.9 (19 reviews)
4.6
4.6
User Avatar
Hello! Can do this task for you very quickly. Today. I have wide experience in writing such utilities on PHP (including client-servers scripts, web scraping, working with databases, APIs, monitoring and control systems, and so on). Almost always online, waiting for your answer Thank you.
$800 HKD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of HONG KONG
Hong Kong, Hong Kong
5.0
22
Payment method verified
Member since Jun 13, 2011

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.