imperium2335 Posted May 23, 2009 Share Posted May 23, 2009 Hi, is there a way to send an attachment (image) using mail? I cant find a decent tutorial on Google. The user will fill out a form then browse for an image file, when submit is pressed the file is sent along with the other info they included. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/159370-php-mail-image-attachment/ Share on other sites More sharing options...
imperium2335 Posted May 24, 2009 Author Share Posted May 24, 2009 please help Link to comment https://forums.phpfreaks.com/topic/159370-php-mail-image-attachment/#findComment-841034 Share on other sites More sharing options...
imperium2335 Posted May 24, 2009 Author Share Posted May 24, 2009 currently i have this but it doesn't show the image: $RHASH = md5(date('r', time())) ; $image_attached = chunk_split(base64_encode(file_get_contents($userfile))) ; mail("[email protected]", "Cake Photo Submission","A submission was completed:\n\nUser Info:\n\nName: $name\n\nJob: $job\n\nWebsite: $website\n\nCake Details:\n\nCake name: $cakename\n\nTags: $tags\n\nShort description: $shrtdesc\n\nLong description: $longdesc\n\nDecorator: $decorator\n\nType: $type\n\nFlavor: $flavor\n\nTiers: $tiers\n\nServes: $serves\n\nPrice: $price\n\nOther info: $other\n\nFile submitted: $userfile\n\nIP of sender: $ip at $date (server time).$image_attached", "From: $email\r\nReply-To: $email\r\nContent-Type: multipart/mixed; boundary=\"PHP-mixed-".$RHASH."\"") ; Link to comment https://forums.phpfreaks.com/topic/159370-php-mail-image-attachment/#findComment-841055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.