#1
|
||
|
can remove spaces from attachment name?
How would you remove the spaces from each attachment name? I think I found a little glitch in the Thunderbird email client, when an attachment arrives with spaces in the name, everything after the first space is dropped off, including the ext.
Thanks! |
#2
|
||
|
yah I can help you later on today
__________________
|
#3
|
||
|
Try this:
Find line 158 Replace: Code:
function phattach($file,$name) { global $boundary; $fp=@fopen($file,"r"); $str=@fread($fp, filesize($file)); $str=@chunk_split(base64_encode($str)); $message="--".$boundary."\n"; $message.="Content-Type: application/octet-stream; name=\"".$name."\"\n"; //$message.="Content-disposition: attachment\n"; Thanks goes to someone named Chris (I think, it was awhile ago) for his fix below! $message.="Content-disposition: attachment; filename=\"".$name."\"\n"; $message.="Content-Transfer-Encoding: base64\n"; $message.="\n"; $message.="$str\n"; $message.="\n"; return $message; } With: Code:
function phattach($file,$name) { global $boundary; $fp=@fopen($file,"r"); $str=@fread($fp, filesize($file)); $str=@chunk_split(base64_encode($str)); $message="--".$boundary."\n"; $message.="Content-Type: application/octet-stream; name=\"".str_replace(' ', "",$name)."\"\n"; //$message.="Content-disposition: attachment\n"; Thanks goes to someone named Chris (I think, it was awhile ago) for his fix below! $message.="Content-disposition: attachment; filename=\"".str_replace(' ', "",$name)."\"\n"; $message.="Content-Transfer-Encoding: base64\n"; $message.="\n"; $message.="$str\n"; $message.="\n"; return $message; }
__________________
|
#4
|
||
|
Thanks Atholon! That works fine....
If($attachment) { $message .= "--MIME_BOUNDRY\n"; $message.="Content-Type: application/octet-stream; name=\"".str_replace(' ', "",$_FILES['attachment']['name'])."\"\n"; $message.="Content-disposition: attachment; filename=\"".str_replace(' ', "",$_FILES['attachment']['name'])."\"\n"; $message.="Content-Transfer-Encoding: base64\n"; $message .= "\n"; $message .= "$str\n"; $message .= "\n"; $message .= "--MIME_BOUNDRY--\n"; } |
#5
|
||
|
no prob
__________________
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
attachment / Attaches | bigjoe11a | Delta Force | 0 | 02-13-2009 07:46 PM |
Empty attachment | ChB | phphq.Net Forums | 1 | 02-16-2006 02:10 PM |
More attachment fields? | DonetsS | phphq.Net Forums | 8 | 10-31-2005 03:48 PM |
attachment again... | Guest | phphq.Net Forums | 0 | 07-18-2005 02:49 AM |
phMailer attachment | Fallu | phphq.Net Forums | 3 | 12-25-2004 01:09 AM |