[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Script for adding "eml" extension to Attachments

Script for adding "eml" extension to Attachments

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Script for adding "eml" extension to Attachments

Postby catman915 » Wed Mar 23, 2005 4:52 am

Does anyone have a script that would add the "eml" extension to all attachments in selected emails received in pocoMail? I'm not a programmer and am having trouble viewing "eml" attachments that somehow are sent without the extensions. Thanks

Edit Eric: FYI deleted duplicate
catman915
Poco Tourist
 
Posts: 49
Joined: Mon Aug 02, 2004 3:29 am
Location: Kentucky, USA

Postby Michael » Fri Mar 25, 2005 3:21 am

The problem with solving this is that PocoScript does not have an native command for renaming files. You could use PocoScript to write a batch file to do this but that gets complicated.

The following is a simple script to loop through the attachments in a message displaying their names:
Code: Select all
ReadAttached $Attachments %Message
LineCount #Attachments $Attachments
:Loop
Dec #Attachments
If #Attachments < 0 Then Done
GetLine $Attachment #Attachments $Attachments
MessageBox $Attachment
GoTo Loop

:Done
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby catman915 » Sat Mar 26, 2005 3:22 am

Thanks Michael.
catman915
Poco Tourist
 
Posts: 49
Joined: Mon Aug 02, 2004 3:29 am
Location: Kentucky, USA

Postby zero » Sun Apr 10, 2005 2:36 pm

I've written (or more precisely, am working on) a script that does this. It examines all files in the attachments directory, and adds a predefined extension to any files there that have no extension.

The only caveat is that this script operates on all files in the attachments directory, and not only on selected messages. I think there is a way around that, but I wanted to keep it simple and get it done.

The script already works, and I just need to iron out some details. I should have it done within a day or two, and of course I'll post it here at that time.
zero
Poco Tourist
 
Posts: 28
Joined: Wed Dec 08, 2004 8:55 am

Postby zero » Sun May 15, 2005 2:08 pm

My time has been divided many times over lately, hence I was not able to get this script done. If the OP indicates that it would still be desired, I will try to get it completed. Otherwise, I'll just drop it. Please let me know, catman915.
zero
Poco Tourist
 
Posts: 28
Joined: Wed Dec 08, 2004 8:55 am

Postby matchstickman » Tue May 24, 2005 12:58 am

The ability to easily zip up files for attachment and sending on would be very useful indeed.

I have found that it is difficult if not impossible to attach content of emails to be forwarded as attachments.

In most circumstances the mail server will reject them if such attachments are not zipped up - as they are a potential security risk. Whereas zip files can be scanned, and cleared before opening.

Any news from 'zero' on possible progress on the proposed script would be appreciated.

Cheers

Matchstickman

:?:
matchstickman
Poco Tourist
 
Posts: 36
Joined: Mon Aug 30, 2004 12:44 am
Location: Sunny Dorset in England


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 2 guests

cron