2 Added required or recommended commands
source | link

Add these into your init file (e.g. ~/.emacs):

(setq
 user-mail-address "email@hotmail.com"
 message-send-mail-function   'smtpmail-send-it
 smtpmail-smtp-server         "smtp.office365.com"
 smtpmail-stream-type 'starttls
 smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil))
 smtpmail-auth-credentials '(expand-file-name "~/.authinfo.gpg")
)

I use spacemacs, so you might want to change these lines. Change your .authinfo~/.authinfo file like this

machine smtp.office365.com login email@hotmail.com port 587 password "pass"
machine outlook.office365.com login "email" port 993 password "pass"

Also, type this into terminal

gpg2gpg -c .authinfo
This protects your files with GPG. It will ask for a password, just enter anything.

Add these into your init file:

smtpmail-stream-type 'starttls
smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil))
smtpmail-auth-credentials '(expand-file-name "~/.authinfo.gpg")

I use spacemacs, so you might want to change these lines. Change your .authinfo file like this

machine smtp.office365.com login email@hotmail.com port 587 password "pass"
machine outlook.office365.com login "email" port 993 password "pass"

Also, type this into terminal

gpg2 -c .authinfo
This protects your files with GPG. It will ask for a password, just enter anything.

Add these into your init file (e.g. ~/.emacs):

(setq
 user-mail-address "email@hotmail.com"
 message-send-mail-function   'smtpmail-send-it
 smtpmail-smtp-server         "smtp.office365.com"
 smtpmail-stream-type 'starttls
 smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil))
 smtpmail-auth-credentials '(expand-file-name "~/.authinfo.gpg")
)

I use spacemacs, so you might want to change these lines. Change your ~/.authinfo file like this

machine smtp.office365.com login email@hotmail.com port 587 password "pass"
machine outlook.office365.com login "email" port 993 password "pass"

Also, type this into terminal

gpg -c .authinfo
This protects your files with GPG. It will ask for a password, just enter anything.

1
source | link

Add these into your init file:

smtpmail-stream-type 'starttls
smtpmail-starttls-credentials '(("smtp.office365.com" 587 nil nil))
smtpmail-auth-credentials '(expand-file-name "~/.authinfo.gpg")

I use spacemacs, so you might want to change these lines. Change your .authinfo file like this

machine smtp.office365.com login email@hotmail.com port 587 password "pass"
machine outlook.office365.com login "email" port 993 password "pass"

Also, type this into terminal

gpg2 -c .authinfo
This protects your files with GPG. It will ask for a password, just enter anything.