(gnus-article-browse-delete-temp-files): Don't make query
[gnus] / lisp / webmail.el
1 ;;; webmail.el --- interface of web mail
2
3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
4 ;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5
6 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
7 ;; Keywords: hotmail netaddress my-deja netscape
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
23
24 ;;; Commentary:
25
26 ;; Note: Now mail.yahoo.com provides POP3 service, the webmail
27 ;; fetching is not going to be supported.
28
29 ;; Note: You need to have `url' and `w3' installed for this backend to
30 ;; work. `w3' must be 4.0pre46+one-line-cookie patch or standalone
31 ;; `url'.
32
33 ;; Todo: To support more web mail servers.
34
35 ;; Known bugs:
36 ;; 1. Net@ddress may corrupt `X-Face'.
37
38 ;; Warning:
39 ;; Webmail is an experimental function, which means NO WARRANTY.
40
41 ;;; Code:
42
43 (eval-when-compile (require 'cl))
44
45 (require 'nnoo)
46 (require 'message)
47 (require 'gnus-util)
48 (require 'gnus)
49 (require 'nnmail)
50 (require 'mm-util)
51 (require 'mm-url)
52 (require 'mml)
53 (eval-when-compile
54   (ignore-errors
55     (require 'url)
56     (require 'url-cookie)))
57 ;; Report failure to find w3 at load time if appropriate.
58 (eval '(progn
59          (require 'url)
60          (require 'url-cookie)))
61
62 ;;;
63
64 (defvar webmail-type-definition
65   '((hotmail
66      ;; Hotmail hate other HTTP user agents and use one line cookie
67      (paranoid agent cookie post)
68      (address . "www.hotmail.com")
69      (open-url "http://www.hotmail.com/")
70      (open-snarf . webmail-hotmail-open)
71      ;; W3 hate redirect POST
72      (login-url
73       "http://%s/cgi-bin/dologin?login=%s&passwd=%s&enter=Sign+in&sec=no&curmbox=ACTIVE&_lang=&js=yes&id=2&tw=-10000&beta="
74       webmail-aux user password)
75      ;;(login-snarf . webmail-hotmail-login)
76      ;;(list-url "%s" webmail-aux)
77      (list-snarf . webmail-hotmail-list)
78      (article-snarf . webmail-hotmail-article)
79      (trash-url
80       "%s&login=%s&f=33792&curmbox=ACTIVE&_lang=&foo=inbox&js=&page=&%s=on&_HMaction=MoveTo&tobox=trAsH&nullbox="
81       webmail-aux user id))
82     (yahoo
83      (paranoid agent cookie post)
84      (address . "mail.yahoo.com")
85      (open-url "http://mail.yahoo.com/")
86      (open-snarf . webmail-yahoo-open)
87      (login-url;; yahoo will not accept GET
88       content
89       ("%s" webmail-aux)
90       ".tries=&.src=ym&.last=&promo=&.intl=&.bypass=&.partner=&.chkP=Y&.done=&login=%s&passwd=%s"
91       user password)
92      (login-snarf . webmail-yahoo-login)