Null Pointer Exception while sending mail with attachment through JavaMail API on amazon server in Java Application

前端 未结 2 1167
暖寄归人
暖寄归人 2021-01-22 14:41

while sending a mail with pdf attachment in amazon server using javamail API, Its throwing null pointer exception in the logs. But same code is working in local.



        
2条回答
  •  天涯浪人
    2021-01-22 14:51

    The problem may be that you can't access the URL in filePath.

    Is filePath a "file:" URL? If so, why not just use a FileDataSource?

提交回复
热议问题