mu4e as Emacs’ default program for sending mail,
see Default email client.
mu4e buries the message buffer after sending; if you want
to kill the buffer instead, add something like the following to your
configuration:
(setq message-kill-buffer-on-exit t)