[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 to edit subject

script to edit subject

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

script to edit subject

Postby ente » Sat Apr 30, 2005 10:09 am

I'm running "Internet Security" (a Norton utility). So far so good.
Only: Now I get plenty of email in wich in the subject line starts or has in the middle of the text "[Norton AntiSpam]"

I tried to write a script which looks for this string in all
incoming mails and deletes it (because it keeps a few other
scripts I have written from running).

Unfortunately without success. Can anybody help?

thank you,
Götz Perll (=ente)

Please do not create duplicate posts.
Thanks in advance ~ Eric :wink:
ente
Resident Poster
 
Posts: 182
Joined: Mon Sep 27, 2004 7:17 am
Location: Zurich, Switzerland

Re: script to edit subject

Postby Eric » Sat Apr 30, 2005 12:19 pm

Hi Peril & welcome to Poco Forums, :D
ente wrote:Unfortunately without success. Can anybody help?
I don't think you'll need a script when the subject contains this text.

Just create a Pre-download filter where the subject contains 'Norton AntiSpam' without the brackets.

Filter messages for: all accounts
Matching: all characters
Search: Subject
For: Norton AntiSpam
Perform: Delete

Of course if you receive a newsletter with that subject, it will be deleted as well. :?

You could first try it out by moving that message to the Junkmail folder to be sure it works as expected.

I hope this helps. :wink:
Eric
 

edit subject line

Postby ente » Sat Apr 30, 2005 7:42 pm

Hello,
thank you for your answer. This filter wouldn't help because then the message will get deleted.
What I wish to do is to edit the subject line only and have deleted "[Norton AntiSpam]", that means the string from bracket to bracket.
All the rest of the subject line, and of course also the mail, I wish to keep.
Sincerely, ente
ente
Resident Poster
 
Posts: 182
Joined: Mon Sep 27, 2004 7:17 am
Location: Zurich, Switzerland

Postby Andreas » Sat Apr 30, 2005 8:09 pm

I haven't tried this myself, but maybe the following will work:

Code: Select all
ReadHeader $Subject "Subject:" %message
SubStrings $Subject "[Norton AntiSpam]"
DeleteHeader "Subject:" %message
AddHeader %message "Subject:" $Subject
Andreas
Poco Enthusiast
 
Posts: 380
Joined: Sun Jul 25, 2004 5:30 pm
Location: Germany


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron