Cannot create a page when email includes both an image in the body and an attachment


Log record:
biz.artemissoftware.confluence.sendemailtopage.SendEMailToPageJob.fireEMailCheck( [http-nio-8090-exec-5] ERROR java.lang.NullPointerException

Freshdesk Tickets


Create a Support Ticket


Ture Hoefner
July 21, 2020, 4:04 PM

I am using this bug to fix the NullPointerException for emails that use a non-existent space. I am not able to reproduce any NullPointerException with adding attachments.

Ture Hoefner
July 16, 2020, 8:15 PM

I can't break it. An email with an image in the body and also an attachment works fine for me.

One thing I did notice, though, was an NPE for sending an email using a space key for a space that does not exist on the server:

[INFO] [talledLocalContainer] java.lang.NullPointerException
[INFO] [talledLocalContainer] at biz.artemissoftware.confluence.sendemailtopage.actions.AddPageAction.execute(
[INFO] [talledLocalContainer] at biz.artemissoftware.confluence.sendemailtopage.EmailEntity.executeActionQueue(
[INFO] [talledLocalContainer] at biz.artemissoftware.confluence.sendemailtopage.SendEMailToPageJob.fireEMailCheck(
[INFO] [talledLocalContainer] at biz.artemissoftware.confluence.sendemailtopage.SendEMailToPageJob$1.doInTransaction(
[INFO] [talledLocalContainer] at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(
[INFO] [talledLocalContainer] at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(
[INFO] [talledLocalContainer] at

I specified the space key with a command tag like: <M2P:space=BT>

steps to reproduce:

  • compose an email w/ any title, the title will be used as the name of a page to create

  • in the body of the (HTML) email insert an image

  • attach some file to the email. I used a *.docx file from a customer

  • send the email to the account configured for M2P

  • in the M2P admin tool click "Check Email Now"

  • see an NPE in the server log (or console in dev).

From AddPageAction#execute:



Ture Hoefner


Vlad PolonTech