Annulé

Bug - Add Attachment in My Email Service

Hello,

I have a problem with my code.. I cant do download attachments, when I click in attachment "[login to view URL]", the link appears this way "[login to view URL]" but the link doesn't existed, and go to automatically to my home page without download the file..

--------------------------------------

$id = $_POST['id'];

$pdo = new PDO("sqlite:[login to view URL]");

$email = $pdo->query("SELECT * FROM `myemails` WHERE `id`='$myid'")->fetch(PDO::FETCH_ASSOC);

$email_body = base64_decode($email['message']);

$letter_html = "";

//$op_getKey = preg_match_all("/Content-Type: multipart\/alternative; boundary=\"(.*?)\"/", $email_body, $getKey);

//$op_getKey = preg_match_all("/alternative; boundary=\"(.*)\"/", $email_body, $getKey);

$op_getKey = preg_match_all("/boundary=\"(.*)\"/", $email_body, $getKey);

//$has_attachment = preg_match_all("/multipart\/mixed/; boundary=\"(.*?)\"/", $email_body, $attachment);

$has_attachment = preg_match_all("/multipart\/mixed/", $email_body, $attachment);

if ($op_getKey) {

if ($has_attachment) {

$mailParts = explode("--" . $getKey[1][1], $email_body);

$attachParts = explode("--" . $getKey[1][0], $email_body);

$get_attach_name=preg_match_all("/filename=\"(.*?)\"/", $attachParts[2], $attach_name);

$get_attach_type=preg_match_all("/Content-Type: (.*?);/", $attachParts[2], $attach_type);

$pure_code = explode("\n\n",$attachParts[2]);

$pure_code = str_replace("\r","",$pure_code[1]);

$pure_code = str_replace("\n","",$pure_code);

}else{

$mailParts = explode("--" . $getKey[1][0], $email_body);

}

--------------------------------------

And I call the function this way

--------------------------------------

<a target="_blank" href="[login to view URL]< ?=$attach_name[1][0]? >" data-target="< ?$id? >">< ?=$attach_name[1][0]? >< /a>

--------------------------------------

So that it is possible, whenever you receive an email, that the file go to the "attachment" folder and can download the images or files ..

And I need a correction of this bug, when receive the emails, in the subject show me like this

--------------------------------------

=?UTF-8?Q?Fwd=2C_analis=C3=A1mos_o_Legion_Y520_da_Lenovo=2C_u?

--------------------------------------

I show u the rest of the code.

I need this in 1 day..

Best Regards

Compétences : PHP, SQLite

en voir plus : can't attach files in outlook web app chrome, outlook web app attachment button not working, firefox outlook web access attachments, can't attach files in outlook 2016, can't attach files in outlook web app firefox, outlook web app attachment button not working firefox, outlook web app attachments not working firefox, cannot attach file in outlook web app internet explorer, Hello , you and Facebook not accept my email , I ask : are you accept Yahoo? , add email service website, check email service linux, blast email service, create email service website, application based email service, attachment asp email form html, write email service, transaction bulk email service, online bulk email service ajax facilities, fax email service asterisk, create email service

Concernant l'employeur :
( 1 commentaire ) World, Portugal

Nº du projet : #15390120

6 freelance font une offre moyenne de €23 pour ce travail

phpfreelancer86

Hello Sir, I've reviewed your requirement and I'm ready to work with you.I have almost 8+ years of experience in web development. I will provide quality work as well full support for any query. Relevant Skills and Ex Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 0 jours
(151 Commentaires)
6.2
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(27 Commentaires)
5.0
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(19 Commentaires)
4.4
amitytech2014

Give us a chance to work with you, we are a very good skilled team we put in all the efforts to complete the given task and achieve the best results,we are looking for long run business relation. Relevant Skills and E Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(20 Commentaires)
3.7
tarantechfacon

Hi I am expert in php and SQLite Relevant Skills and Experience php Proposed Milestones €13 EUR - upfront €10 EUR - after delevired

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(2 Commentaires)
2.4
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 10 jours
(0 Commentaires)
0.0