[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hack to prevent forgetting attachments



Hi all,

gmail has a feature that reminds you if you forget an attachment. With
this bit of elisp, WL can do the same thing.

(defun egh:wl-draft-check-attachment ()
  (save-excursion
    (mail-text)
    (if (re-search-forward "attach" nil t)
        (progn
          (mail-text)
          (unless (re-search-forward mime-edit-beginning-tag-regexp nil t)
            (unless (yes-or-no-p "You used the word `attach' in this mail, but did not include an attachment. Are you sure you want to send? ")
              (error "No attachment!")))))))

(add-hook 'wl-draft-send-hook 'egh:wl-check-attachment)

best, Erik

-- 
Sent from my free software system <http://fsf.org/>.