Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php email attachment

Tags:

php

email

i am using this script for the email attachment but when i execute the form on my server it shows to warning

Warning: fread(): supplied argument is not a valid stream resource

Warning: fclose(): supplied argument is not a valid stream resource

pls help

like image 381
webkul Avatar asked Feb 26 '26 03:02

webkul


2 Answers

Change this:

$fp = fopen($strresume, "rb"); 
$file = fread($fp, $strresume_size); 

to this:

$fp = fopen($filetemp, "rb"); 
$file = fread($fp, $strresume_size); 
like image 157
Tyler Carter Avatar answered Feb 28 '26 16:02

Tyler Carter


I use this function to send HTML email with an attachment:

http://www.barattalo.it/2010/01/10/sending-emails-with-attachment-and-html-with-php/

like image 24
Pons Avatar answered Feb 28 '26 18:02

Pons