Find Jobs
Hire Freelancers

Help needed with: imap_fetchbody

$10-20 USD

Cancelled
Posted over 7 years ago

$10-20 USD

Paid on delivery
I have some problems with fetching the HTML body from emails from my webserver into my MySQL database. All the data from the email is stored correctly, it just doesn't store the HTML emails correctly. This is the part of the PHP that has to fetch the body. I want it to fetch a plain text version and an HTML version. ----- $message = mysqli_real_escape_string($connect,quoted_printable_decode(imap_fetchbody($inbox,$email_number,1.1))); $message_html = mysqli_real_escape_string($connect,quoted_printable_decode(imap_fetchbody($inbox,$email_number,1.2))); if($message == '') { $message = mysqli_real_escape_string($connect,strip_tags(quoted_printable_decode(imap_fetchbody($inbox,$email_number,1)))); $message_html = mysqli_real_escape_string($connect,quoted_printable_decode(imap_fetchbody($inbox,$email_number,1))); } ----- I checked some emails on my webserver and the encoding is not always the same: Email 1: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Email 2: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: base64 Email 3: Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable So, how to do it right? Should I firstly check which encoding is used? I won't give you access to my mailserver or webserver. Of course I can supply you with the files that are relevant.
Project ID: 12708319

About the project

6 proposals
Remote project
Active 7 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
6 freelancers are bidding on average $23 USD for this job
User Avatar
Hi there! Did go through your Job Description and glad to share that I have experience in working with wordpress platform. I have more than four years of industry experience and have been the part of diverse industry verticals. I also have expertise with Magento,WordPress, PHP, PHP Scripting and CodeIgnitor along with Photoshop. So can help you with the design as well. Looking forward to your response.
$20 USD in 1 day
4.9 (21 reviews)
3.5
3.5
User Avatar
why dont use oop ? .................................................................................
$20 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi! You are right, the encoding can differ from one email to another. Therefore, you must first fetch the structure of the email and then parse the email accordingly. I can provide you with an php script which does all that, and in the end it returns you both the plain and html content of the email. Looking forward to hearing from you!
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of BULGARIA
Sofia, Bulgaria
5.0
87
Payment method verified
Member since Jun 24, 2008

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.