-
Notifications
You must be signed in to change notification settings - Fork 1
/
mail.el
34 lines (26 loc) · 965 Bytes
/
mail.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;;; package --- Summary
;;; Commentary:
;;; Code:
;; Info gmail
;; SMTP Host: smtp.gmail.com.
;; SMTP Port: el puerto del servidor SMTP de Gmail predeterminado es 465 para SSL y 587 para TSL.
(defun alezf-send-mail (recipient &optional subject body attachment)
"Sends mail to a RECIPIENT with an optional SUBJECT, BODY and ATTACHMENT."
(progn
(mail)
(mail-to) (insert recipient)
(when subject
(mail-subject) (insert subject))
(when body
(mail-text) (insert body))
(when attachment
(mail-add-attachment attachment))
(mail-send-and-exit)))
(defun advice-unadvice (sym)
"Remove all advices from symbol SYM."
;;TODO: mover esta función a otro módulo
;; tomado de https://emacs.stackexchange.com/questions/24657/unadvise-a-function-remove-all-advice-from-it
(interactive "aFunction symbol: ")
(advice-mapc (lambda (advice _props) (advice-remove sym advice)) sym))
(provide 'mail)
;;; mail.el ends here