fix error caused by the To header does not exist
fix open action so as to move to the first line
add opener when opening a buffer