Next: , Up: How do I use mail in Emacs?   [Contents][Index]

8.1.1 Outgoing mail

For outgoing mail, you will need to use smtpmail.el which allows Emacs to talk directly to SMTP mail servers. This is included with Emacs, and can be set up as follows:

(setq user-full-name "Your full name")
(setq user-mail-address "[email protected]")
(setq smtpmail-default-smtp-server "domain.name.of.your.smtp.server")

(setq send-mail-command 'smtpmail-send-it) ; For mail-mode (Rmail)
(setq message-send-mail-function 'smtpmail-send-it) ; For message-mode (Gnus)

Note that if you want to change the name of the SMTP server after smtpmail is loaded, then you’ll need to change smtpmail-smtp-server.

If you are experiencing problems with sending large messages, check the value of the variable smtpmail-debug-info. If it is non-nil, you should set it to nil: