[interchange-cvs] interchange - racke modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Fri Jan 23 11:46:56 UTC 2009
User: racke
Date: 2009-01-23 11:46:56 GMT
Modified: . Tag: STABLE_5_6-branch WHATSNEW-5.6
Modified: code/UserTag Tag: STABLE_5_6-branch email.tag
Log:
Made [email] process cc and bcc options for plain text emails (#250).
Revision Changes Path
No revision
No revision
2.1.2.16 interchange/Attic/WHATSNEW-5.6
rev 2.1.2.16, prev_rev 2.1.2.15
Index: WHATSNEW-5.6
===================================================================
RCS file: /var/cvs/interchange/Attic/WHATSNEW-5.6,v
retrieving revision 2.1.2.15
retrieving revision 2.1.2.16
diff -u -r2.1.2.15 -r2.1.2.16
--- WHATSNEW-5.6 6 Jan 2009 20:23:40 -0000 2.1.2.15
+++ WHATSNEW-5.6 23 Jan 2009 11:46:56 -0000 2.1.2.16
@@ -7,6 +7,16 @@
See UPGRADE document for a list of incompatible changes.
+Interchange 5.6.2 not yet released.
+
+UserTag
+-------
+
+* Made [email] process cc and bcc options for plain text emails (#250).
+
+
+------------------------------------------------------------------------------
+
Interchange 5.6.2 not yet released.
No revision
No revision
1.14.2.1 interchange/code/UserTag/email.tag
rev 1.14.2.1, prev_rev 1.14
Index: email.tag
===================================================================
RCS file: /var/cvs/interchange/code/UserTag/email.tag,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -r1.14 -r1.14.2.1
--- email.tag 30 Mar 2007 23:40:56 -0000 1.14
+++ email.tag 23 Jan 2009 11:46:56 -0000 1.14.2.1
@@ -5,7 +5,7 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: email.tag,v 1.14 2007-03-30 23:40:56 pajamian Exp $
+# $Id: email.tag,v 1.14.2.1 2009-01-23 11:46:56 racke Exp $
UserTag email Order to subject reply from extra
UserTag email hasEndTag
@@ -24,7 +24,7 @@
sub {
my ($to, $subject, $reply, $from, $extra, $opt, $body) = @_;
my $ok = 0;
- my @extra;
+ my ($cc, $bcc, @extra);
use vars qw/ $Tag /;
@@ -35,8 +35,12 @@
$from =~ s/,.*//;
}
+ # Use local copy to avoid mangling with caller's data
+ $cc = $opt->{cc};
+ $bcc = $opt->{bcc};
+
# Prevent header injections from spammers' hostile content
- for ($to, $subject, $reply, $from) {
+ for ($to, $subject, $reply, $from, $cc, $bcc) {
# unfold valid RFC 2822 "2.2.3. Long Header Fields"
s/\r?\n([ \t]+)/$1/g;
# now remove any invalid extra lines left over
@@ -93,7 +97,8 @@
From => $from,
Subject => $subject,
Type => $opt->{mimetype},
- Cc => $opt->{cc},
+ Cc => $cc,
+ Bcc => $bcc,
@extra_headers,
;
$opt->{body_mime} ||= 'text/plain';
@@ -177,6 +182,14 @@
}
}
+ if ($cc) {
+ push(@extra, "Cc: $cc");
+ }
+
+ if ($bcc) {
+ push(@extra, "Bcc: $bcc");
+ }
+
$ok = send_mail($to, $subject, $body, $reply, 0, @extra)
unless $sent_with_attach;
More information about the interchange-cvs
mailing list