Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[ljcom] r11169: LJSV-1906: Comment notification emails n...

Committer: amyshkin
LJSV-1906: Comment notification emails not respecting plain text setting
U   trunk/cgi-bin/LJ/Hooks/ESN.pm
Modified: trunk/cgi-bin/LJ/Hooks/ESN.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/ESN.pm	2011-11-10 07:17:20 UTC (rev 11168)
+++ trunk/cgi-bin/LJ/Hooks/ESN.pm	2011-11-10 07:21:15 UTC (rev 11169)
@@ -46,17 +46,30 @@
         %{$opts->{_debug_headers}   || {}}
     );
 
-    LJ::send_mail({
-        to       => $ev->as_email_to($u),
-        from     => $ev->as_email_from(),
-        fromname => scalar($ev->as_email_from_name($u)),
-        wrap     => 1,
-        charset  => $u->mailencoding || 'utf-8',
-        subject  => $email_subject,
-        headers  => \%headers,
-        body     => $plain_body,
-        html     => $html_body,
-    }) or die "unable to send notification email";
+    if ( $u->{opt_htmlemail} eq 'N' ) {
+        LJ::send_mail({
+            to       => $ev->as_email_to($u),
+            from     => $ev->as_email_from(),
+            fromname => scalar($ev->as_email_from_name($u)),
+            wrap     => 1,
+            charset  => $u->mailencoding || 'utf-8',
+            subject  => $email_subject,
+            headers  => \%headers,
+            body     => $plain_body,
+        }) or die "unable to send notification email";
+    } else {
+        LJ::send_mail({
+            to       => $ev->as_email_to($u),
+            from     => $ev->as_email_from(),
+            fromname => scalar($ev->as_email_from_name($u)),
+            wrap     => 1,
+            charset  => $u->mailencoding || 'utf-8',
+            subject  => $email_subject,
+            headers  => \%headers,
+            body     => $plain_body,
+            html     => $html_body,
+        }) or die "unable to send notification email";
+    }
 
     return 1;
 });

Tags: amyshkin, ljcom, pm, zilogic
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments