email - php mail attachment not working with some clients -


I have a webform which allows our agents to upload a PDF attachment which will then be emailed to our customer. is. The code I get on a website I use to create an email and it seems that until recently it worked fine. It seems that instead of being interpreted as a postal client attachment for some (only some people, for example Gmail) attachment is printed in the body of the email, it works with almost every customer, but we have some Why did it have to be tried so why any solution of this would be greatly appreciated because I do not have much information about it.

  if ($ _FILES ["file"] ["error"]> gt;) {echo "error:" $ _FILES ["file"] ["error"] "& Lt; br / & gt;"; Return; } If ($ _FILES ["file"] ["type"]! = "App / pdf") {echo should be valid & lt; centre> gtk; pdf & lt; br & gt; & lt; a href = '.. / index .php' & gt; Tilbaka & lt; / a & gt; & lt; / center & gt; "; Return; } $ File = chunk_split (base64_encode (file_get_contents ($ _ files ['file'] ['tmp_name']))); / * Pulled parts into some parts of body building, note that there is no comment field in the actual version of this source code. * / $ Msg = "msg here .." // I have pushed this part out because it is not strange about the body how its plain text $ random_hash = md5 (date ('r', time) Has been created; ob_start ();? & Gt; - PHP-composite -> ?? php echo $ random_hash;? & Gt; content-type: multipart / optional; boundary = "PHP-alt-& lt; ? Php echo $ random_hash ;? & gt; "--php- alt- & lt ;? php echo $ random_hash; ?? gt; content-type: text / plain; charset =" ISO-885 9-1 "content-transfer -Encoding: 7bit 

How do you read an e-mail from a customer, it Can not understand that some parts are very clever and try to include attachments in the body, for example images are often included. You can not do much about that, a solution will have to store the PDF on your server and email a link to download it.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -