Personally, I prefer Emacs Gnus for sending and reading email.

There are somethings you have to be aware if configuring multiple
accounts, but that is minor issue, for such cases, in your .emacs file,
you can do something like this if you, like me, prefer to send email
using SMTP (with the `smtpmail' Emacs module/package):

--8<---------------cut here---------------start------------->8---
(defun temp-smtpmail-stream-type (fun &rest r)
  (let ((smtpmail-stream-type
         (cond
          ((string= smtpmail-smtp-server "mail.gandi.net") 'tls)
          ((string= smtpmail-smtp-server "mail.provider.tld") 'ssl)
          (t smtpmail-stream-type))))
    (apply fun r)))

(advice-add 'smtpmail-via-smtp :around #'temp-smtpmail-stream-type)
--8<---------------cut here---------------end--------------->8---

Basically the defined function (defun) `temp-smtpmail-stream-type' will
test to see which SMTP server you're trying to connect to, and based on
that, use your personal port/encryption/stream type, otherwise, it just
returns the previous (before the defun) value of `smtpmail-stream-type'.

The line with `advice-add' makes the default `smtpmail-via-smtp'
function respect our decision every time it's called, but with the added
benefit of not having to redefine `smtpmail-via-smtp'.

After this small .emacs change, now it's time to tell your Gnus how to
behave if you happen to have multiple receiving accounts configured in
Gnus, and want to compose a reply with all authentication details setup
correctly (because it's tedious to have to tell which SMTP server to
connect to), to do so automatically, make use of posting styles (see the
Gnus info page for more, here is mine:

--8<---------------cut here---------------start------------->8---
(setq gnus-posting-styles '((".*"
                             (name "Adonay Felipe Nogueira")
                             (address "adf...@hyperbola.info")
                             (From "Adonay Felipe Nogueira 
<adf...@hyperbola.info>")
                             ("X-Message-SMTP-Method" "smtp mail.gandi.net 465 
adf...@hyperbola.info"))
                            ((header "Delivered-To" "adf...@hyperbola.info")
                             (address "adf...@hyperbola.info")
                             ("X-Message-SMTP-Method" "smtp mail.gandi.net 465 
adf...@hyperbola.info"))
                             ((header "Delivered-To" "evalua...@provider.tld")
                             (name "Eva Luator")
                             (address "evalua...@provider.tld")
                             ("X-Message-SMTP-Method" "smtp mail.provider.tld 
465 evalua...@provider.tld"))))
--8<---------------cut here---------------end--------------->8---

The most important part is "X-Message-SMTP-Method", it has to match with
your preferred port/encryption/stream type.

Finally, put the relative information in your .authinfo file:

--8<---------------cut here---------------start------------->8---
machine mail.gandi.net port 465 login adf...@hyperbola.info password [Password 
for SMTP.]
machine mail.provider.tld port 465 login evalua...@provider.tld password 
[Password for SMTP.]
--8<---------------cut here---------------end--------------->8---

... encrypt this file with something like `gpg --recipient "[Your GnuPG
identity.]" --output "[Path to .authinfo.].gpg" --encrypt "[Path to
.authinfo.]"'.

When, done delete ".authinfo" (and the backups, if Emacs happanes to
make them) and leave only ".authinfo.gpg".

Remember that this message/hint only covers multiple SMTP accounts, not
POP3 accounts because these (POP3) are easiler to set up in Gnus and in
your ".authinfo" file.

I hope this helps. ;)

2017-12-01T07:44:33-0600 Caleb Herbert wrote:
> Yes, you're right!  DIRED is the best file manager ever.  If I could use
> it as my one and only file manager, I would.  Unfortunately, when I plug
> in a new flash drive, it doesn't open up an Emacs client with DIRED.
>
> Emacs for email is quite useful as well, although I've only used the
> Emacs mail programs directly on my mail server, because I don't know how
> to configure it otherwise.  I'd like to have Stallman's email setup; the
> simplicity of C-x m and RMAIL is nice.
>
> And M-x woman is the most attractive /usr/bin/man.  Hyperlinks and
> stuff.

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.

Reply via email to