[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 - Removing sender from junksender.txt?

Removing sender from junksender.txt?

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Removing sender from junksender.txt?

Postby Chuck_IV » Fri Sep 02, 2005 10:58 am

I'm trying to do some junk mail scripting. I have one script that adds the sender to the junksender.txt file and moves the message to the Junk mail folder(I modified the script ban_sender_and_delete.poc from the scripts page) to do this.

However, I also want to set one up that "UNJunk's" a message, by removing the sender from the junksender.txt file and moving the message back to the INbox.

Where I am totally stumped is how to remove the address from the junksender.txt file. I was trying to modify the above script again but am kinda stumped as to how to remove the address.

If someone could give some tips on how to do this, I'd appreciate it.

Thanx
Chuck_IV
Poco Tourist
 
Posts: 25
Joined: Fri Jan 28, 2005 6:52 am
Location: Connecticut

Re: Removing sender from junksender.txt?

Postby MarkB » Sun Sep 04, 2005 2:46 am

Chuck_IV wrote:Where I am totally stumped is how to remove the address from the junksender.txt file. I was trying to modify the above script again but am kinda stumped as to how to remove the address.

If someone could give some tips on how to do this, I'd appreciate it.

Could you try adapting this little test script?
Code: Select all
Set $filename "C:\Documents and Settings\Joe\Desktop\test.txt"
Set $address "grover@hotmale.com"
OpenBody $b $filename
LocateLine #ln $address $b
DeleteLine $b #ln
SaveBody $b $filename
MarkB
Poco Enthusiast
 
Posts: 217
Joined: Mon Aug 09, 2004 1:31 am
Location: Canada

Re: Removing sender from junksender.txt?

Postby Chuck_IV » Sun Sep 04, 2005 5:35 pm

MarkB wrote:
Chuck_IV wrote:Where I am totally stumped is how to remove the address from the junksender.txt file. I was trying to modify the above script again but am kinda stumped as to how to remove the address.

If someone could give some tips on how to do this, I'd appreciate it.

Could you try adapting this little test script?
Code: Select all
Set $filename "C:\Documents and Settings\Joe\Desktop\test.txt"
Set $address "grover@hotmale.com"
OpenBody $b $filename
LocateLine #ln $address $b
DeleteLine $b #ln
SaveBody $b $filename



Thanx. I had ended up doing something similar but I used LinePos instead of locateline. Seems to work ok with LinePos
Chuck_IV
Poco Tourist
 
Posts: 25
Joined: Fri Jan 28, 2005 6:52 am
Location: Connecticut


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron