Details

    • Type: Bug
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0.254
    • Fix Version/s: 4.5.4.015, 5.0.1.60
    • Labels:
    • Environment:

      Windows 2008 R2

      Description

      CFMAIL produces a NPE when its type is set to HTML and the body of the email is empty. The generated email remains stuck in the mail spool.

      The error is reproducible with script and tags as below:

      <cfscript>
      mailBody = "";
      
      mailService = new mail(
        to = "me@domain.com",
        from = "me@domain.com",
        subject = "test",
        type = "html",
        body = mailBody
      );
      
      mailService.send();
      </cfscript>
      
      <cfset mailBody = "">
      <cfmail from="me@domain.com" to="me@domain.com" subject="test" type="html">#mailBody#</cfmail>
      

      "ERROR","Thread-28522","09/13/2016","21:24:28","","mail;java.lang.NullPointerException;lucee.runtime.exp.NativeException: java.lang.NullPointerException
      at java.lang.String.getBytes(String.java:940)
      at lucee.runtime.net.smtp.StringDataSource.getInputStream(StringDataSource.java:52)
      at javax.activation.DataHandler.writeTo(DataHandler.java:304)
      at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1485)
      at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1773)
      at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1119)
      at lucee.runtime.net.smtp.SMTPSender.run(SMTPSender.java:61)
      Caused by: java.lang.NullPointerException

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              byrning Sean Stewart
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: