[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 - output filtering to block sending?

output filtering to block sending?

Help and advice on using PocoMail

Moderators: Eric, Tomas, robin

output filtering to block sending?

Postby yoopits » Thu Sep 02, 2010 3:37 pm

Is it possible, using output filtering, to prevent a message from being sent? Specifically, I want to prevent messages from one specific account (for example, xyz@dom.com) from getting sent out.
I've been experimenting, but no matter what filtering I've tried so far, the message has always gotten mailed out. Even the "stop processing" filter doesn't block sending.
Thanks, David
yoopits
Drop-in Visitor
 
Posts: 10
Joined: Thu Oct 09, 2008 12:53 am

Postby Tomas » Sat Sep 04, 2010 1:43 am

Stop processing is, I believe, to stop further filter actions for that message.

Are the messages you wish to prevent, automatically created?

Do you want to stop the sending function for that account completely?
Tomas
Tomas
Pillar of the Community
 
Posts: 1418
Joined: Sun Jul 25, 2004 1:34 am

Postby yoopits » Sat Sep 04, 2010 4:50 am

Tomas wrote:Are the messages you wish to prevent, automatically created?
Do you want to stop the sending function for that account completely?

They are created manually. Stopping the sending function for that account completely would be OK.
-----
Here's what I'm doing:

I set up a dummy account and made it the default. So when I compose a new message it gets the dummy account as its "From". My intention is to always change this to an appropriate "From" account.

But if I hit Send before I remember to change the From account, I want the message to be blocked. (As a rule, I remember to make the change about 200 msec after hitting Send.)
yoopits
Drop-in Visitor
 
Posts: 10
Joined: Thu Oct 09, 2008 12:53 am

Postby MarkB » Sat Sep 04, 2010 10:11 am

Tomas is probably taking a weekend. One approach would be to filter outgoing messages and, if necessary, call a script to change the account and sender's address in the outgoing message.

Filter for outgoing messages:
If the account is the default account
Or if the From address is such and such
Then run the script

You would work as you normally do, but when you forget to change accounts before hitting Send the script lets you select an account and then modifies the message accordingly.

Code: Select all
{  Changes the account and From address of an outgoing message.
{  MarkB, 2010-09

If #PocoScriptMode = 2 Then ChangeAccounts
AddStrings $t "The script '" $PocoScriptName "' is for outgoing messages only"
MessageBox $t
Exit

:ChangeAccounts
AddStrings $title $PocoScriptName " (outgoing message)"
AddStrings $description "Please select an account for the message\nTo:  %to%\nSubject:  %subject%"
ReplaceCVT $description %message False
Trim $description
DialogBox $title $description "Account%accounts%" $account ""
SetAccount $account
ReadFullname $name
ReadEmail $address
AddStrings $fulladdress $name " <" $address ">"
Trim $fulladdress
DeleteHeader "From:" %message
AddHeader %message "From:" $fulladdress
DeleteHeader "X-Account:" %message
AddHeader %message "X-Account:" $account
MarkB
Poco Enthusiast
 
Posts: 217
Joined: Mon Aug 09, 2004 1:31 am
Location: Canada

block sending

Postby yoopits » Sun Sep 05, 2010 1:58 am

Hi MarkB,

I had thought of writing a script, but I so rarely use scripting that I didn't want to spend the time re-familiarizing myself with Pocoscript. Apparently, you spend more time with Pocoscript than I ever did! To the extent that I figured out your script, it was pretty impressive -- and quickly done.

In this case, though, Tomas's comment led me to a simpler solution, even if it's not user-friendly (no feedback about what happened).

When Tomas asked if I want to stop the sending function for that account completely, I realized I could look at the "outgoing" parameters for that account and mess with them. In fact, I just needed to zap the "outgoing server" name. Now, when I hit Send, my New Message window just blinks off and back on (that's all the feedback I get), and I can immediately change the From account to whatever it needs to be.

Meanwhile, thanks for taking the time and effort to create a solution for me. I certainly appreciate that!
yoopits
Drop-in Visitor
 
Posts: 10
Joined: Thu Oct 09, 2008 12:53 am


Return to PocoMail Help and How-To

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron