Compose an email with an inline image
Looks like you're using com.apple.com rather than com.apple.mail in your defaults write or defaults delete commands.

defaults delete com.apple.mail AttachAtEnd should do the trick.