write mailbox successfully using reference