[vhffs-dev] [1176] Added Precedence field on mass mailings and on mailing lists ( may prevent stupid blacklisting) |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [1176] Added Precedence field on mass mailings and on mailing lists ( may prevent stupid blacklisting)
- From: subversion@xxxxxxxxxxxxx
- Date: Tue, 25 Mar 2008 20:10:56 +0100
Revision: 1176
Author: gradator
Date: 2008-03-25 20:10:56 +0100 (Tue, 25 Mar 2008)
Log Message:
-----------
Added Precedence field on mass mailings and on mailing lists (may prevent stupid blacklisting)
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Functions.pm
trunk/vhffs-listengine/src/listengine.pl
trunk/vhffs-robots/src/mailing.pl
Modified: trunk/vhffs-api/src/Vhffs/Functions.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Functions.pm 2008-03-19 06:59:56 UTC (rev 1175)
+++ trunk/vhffs-api/src/Vhffs/Functions.pm 2008-03-25 19:10:56 UTC (rev 1176)
@@ -265,6 +265,7 @@
my $mailtag = shift;
my $subject = shift;
my $message = shift;
+ my $precedence = shift;
$subject = $mailtag.' '.$subject if( defined $mailtag );
$subject = Encode::encode_utf8( $subject );
@@ -278,6 +279,9 @@
Type => 'text/plain; charset=utf-8',
Encoding => '8bit',
Data => $message;
+
+ $msg->add('Precedence' => $precedence) if( defined $precedence );
+
$msg->send;
return 1;
Modified: trunk/vhffs-listengine/src/listengine.pl
===================================================================
--- trunk/vhffs-listengine/src/listengine.pl 2008-03-19 06:59:56 UTC (rev 1175)
+++ trunk/vhffs-listengine/src/listengine.pl 2008-03-25 19:10:56 UTC (rev 1176)
@@ -88,6 +88,7 @@
$header->replace( 'List-Id' , $list->get_localpart.".".$list->get_domain );
$header->replace( 'List-Post' , '<mailto:'.$list->get_localpart."@".$list->get_domain.'>' );
$header->replace( 'List-Archive' , '<'.$mailinglistconfig->{'url_archives'}.'/'.$list->get_domain.'/'.$list->get_localpart.'>' ) if( $mailinglistconfig->{'url_archives'} );
+ $header->replace( 'Precedence' , 'list' );
#Replace the Reply-To field if selected in the panel
$header->replace( 'Reply-To' , $list->get_localpart ."\@" . $list->get_domain ) if( $list->get_replyto == 1 );
Modified: trunk/vhffs-robots/src/mailing.pl
===================================================================
--- trunk/vhffs-robots/src/mailing.pl 2008-03-19 06:59:56 UTC (rev 1175)
+++ trunk/vhffs-robots/src/mailing.pl 2008-03-25 19:10:56 UTC (rev 1176)
@@ -63,7 +63,7 @@
foreach my $user ( @{$users} )
{
next unless defined $user;
- Vhffs::Functions::send_mail( $from , $user->get_mail , $vhffs->get_config->get_mailtag , $mailings->{$idm}{subject} , $mailings->{$idm}{message} );
+ Vhffs::Functions::send_mail( $from , $user->get_mail , $vhffs->get_config->get_mailtag , $mailings->{$idm}{subject} , $mailings->{$idm}{message} , 'bulk' );
}
my $query = "UPDATE vhffs_mailings SET state='".Vhffs::Constants::ACTIVATED."' WHERE id_mailing='".$idm."'";