HTML email handler v2.6

Release Notes

  • added: file attachment support #10 thanks to Facyla
  • fixed: content from a WYSIWYG-editor has a different result in the e-mail
  • bakKer i having problem with attachment .. $params = array('attachments' => array('mimetype'=> 'image/jpeg', "filepath"=> $attach, "filename" => "bg1.jpg")); can u tell me what the content i need to specify for the mimetype , filepath , filename .. example i want to put a jpg image but i am getting three attachment . in 0 bytes.. in filepath .. entire path must be given like this (www.example.com/file/file.jpg) and in filename (file.jpg) is these things right because i am getting three atttachment file with 0 bytes

  • Been trying to nut this problem out for a while.

    With the HTML Email Handler installed I get lots of extra lines (looks like <BR> tags) in the email. I asked about this in v2.3 and not sure why I did not followup to conclusion (you can see the exchange on the 2.3 discussion). At that time the last test was to try the direct sending of HTML mail.

    Anyway, this is the test;

    - turn  off HTML email handler - RESULT: not extra lines or text in group discussion or direct messages. No HTML at all (of course).

    - turn on HTML email handler - RESULT: extra lines for every carridge return in the email including bullets

    - send direct messages between users - RESULT: same as for discussions

    note: I modified mod/messages/start to remove the STRIP function from this line

    $message_contents = strip_tags($body)

    Any ideas on how to diagnose welcome..

     

    B

     

  • So I discovered the extra lines were <BR> tags.. They were being inserted by a "nlbr" in the "views/default/html_email_handler/notification/body.php".

    The issue is the message body already has <p></p> around new lines so I dont know why the "nlbr" function is necessary.

    If I remove parsing the message body, using this function it seems to work.

    Anyone have a comment why the nlbr is necessary. Am I going to break something by removing it.

     

    Brad

  • @buraddo

    So I discovered the extra lines were <BR> tags.. They were being inserted by a "nlbr" in the "views/default/html_email_handler/notification/body.php".

    The issue is the message body already has <p></p> around new lines so I dont know why the "nlbr" function is necessary.

    If I remove parsing the message body, using this function it seems to work.

    Anyone have a comment why the nlbr is necessary. Am I going to break something by removing it.

    If you remove the nlbr() functions most of the notifications generated by the system (eg new friend, some commented on you content, etc) will lose some of there markup.

    If you use the 2.6 version (for Elgg 1.8) then the problems which you discribe in 2.3 will be fixed, see the release notes for this version

    • fixed: content from a WYSIWYG-editor has a different result in the e-mail

     

  • @jeabakker

    Same problem with 2.6 version extra <BR> after </p> and bulleted lists etc...

    I don't see any change to the code of body.php..

    B

     

  • Looking at the GIT repo commits the

    • fixed: content from a WYSIWYG-editor has a different result in the e-mail

    Is a margin change for the css around the <p> tags. This doesn't really have an impact on the nl2br function adding a <BR> tag to the $message content.

     

  • Hi Jerome,

    I reopen this old thread, because I have got the same issue as @burrado in spite of the fix introduced in v2.6

    I created an issue in github and suggest a workaround.

    oseg

Jerome Bakker

Developer @ ColdTrick IT Solutions

Stats

  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2019-4-9
  • Downloads: 7788
  • Recommendations: 37

Other Projects

View Jerome Bakker's plugins