[ic] Email tag / MIME:Lite
Peter
peter at pajamian.dhs.org
Thu Oct 8 11:30:37 UTC 2020
On 8/10/20 11:59 pm, Phil Smith wrote:
> It looks like MIME::Lite is no longer working within Interchange, would
> anyone please share their replacement UserTags, before I hack my own
> together.
Just to show that it does I have perl 5.24.0 with this code in IC:
[tmp success][email
from=`$Scratch->{email_from}`
to=`$Scratch->{Email}`
subject=`$Scratch->{subject}`
html=`$Scratch->{html_part}`
][scratch text_part][/email][/tmp]
It needs Mime::Lite for the html part there. I did have to modify the
email tag, but not for this issue, it had to do with an encoding issue
in the headers:
--- email.tag~ 2016-10-20 10:21:17.000000000 +0000
+++ email.tag 2019-07-15 17:11:05.915000000 +0000
@@ -93,14 +93,15 @@
my @extra_headers;
# encode values if utf8 is supported
- if($utf8){
- $to = utf8_to_other($to, 'MIME-Header');
- $from = utf8_to_other($from, 'MIME-Header');
- $subject = utf8_to_other($subject, 'MIME-Header');
- $cc = utf8_to_other($cc, 'MIME-Header');
- $bcc = utf8_to_other($bcc, 'MIME-Header');
- $reply = utf8_to_other($reply, 'MIME-Header');
- }
+ # We can't encode these!
+# if($utf8){
+# $to = utf8_to_other($to, 'MIME-Header');
+# $from = utf8_to_other($from, 'MIME-Header');
+# $subject = utf8_to_other($subject, 'MIME-Header');
+# $cc = utf8_to_other($cc, 'MIME-Header');
+# $bcc = utf8_to_other($bcc, 'MIME-Header');
+# $reply = utf8_to_other($reply, 'MIME-Header');
+# }
my %msg_args = (To => $to,
From => $from,
@@ -127,6 +128,7 @@
$msg_args{Type} ||= 'multipart/mixed';
}
+ $msg_args{Encoding} = '8bit';
my $msg = MIME::Lite->new(%msg_args);
for(@extra) {
Peter
More information about the interchange-users
mailing list