Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to sent mail from emacs?

I found this

There are two ways to send the message. C-c C-s (mail-send) sends the message and marks the mail buffer unmodified, but leaves that buffer selected so that you can modify the message (perhaps with new recipients) and send it again. C-c C-c (mail-send-and-exit) sends and then deletes the window or switches to another buffer

But both ( ctrl+c ctrl+s ) and (ctrl-c crtl+c) are not working

share|improve this question

migrated from Apr 2 '10 at 12:27

This question came from our site for professional and enthusiast programmers.

Are you talking about sending mail from mutt using emacs as an editor (in which case you need to return to mutt to send the email) or sending mail using emacs as the email client? – Quentin Apr 1 '10 at 9:49
@dorward: either way, this is not an SF question. An SF question would need details of the MTA to be answerable. – Charles Stewart Apr 1 '10 at 10:58
remember that emacs has to be in mutt-mode for the bindings to work – Steen Feb 21 '13 at 9:25
up vote 4 down vote accepted

If you've invoked Emacs as Mutt's message composer, then you don't want to send the message from Emacs, so ignore what Emacs tells you about how to send a message.

Instead, you want to exit the editor (C-x C-c) to return to Mutt with the now-composed message.

Alternatively, use one of the many MUAs that are provided with Emacs (I recommend Gnus or Wanderlust) so you don't have to keep going into and out of the editor.

share|improve this answer

mail-send and mail-send-and-exit are not related with mutt, but with pure emacs way to send email.

If you want to use mutt+emacs you will want to:

  • use emacs-server: add (server-start) somewhere in you .emacs and launch emacs so it will be availaible for emacsclient
  • set EDITOR to 'emacsclient --alternate-editor ""', adding

     export EDITOR='emacsclient --alternate-editor ""'

    in your .bashrc will do, or configure mutt to use this as its editor (I don't know how).

  • once all this is done, mutt will use emacsclient for editing a message, emacslient will connect to an existing emacs if there is one, or launch a new one if there is none with your message in it
  • you will have to use C-x # once your message is edited, for mutt to continue its work and send the message.
share|improve this answer

Is Emacs started by mutt? I used to use mutt with vim and IIRC, I had to save and close vim with :wq when I wanted to send the message, maybe you have to do so either.

share|improve this answer
yes..emacs is started with mutt. – lakshmipathi Apr 1 '10 at 9:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .