- (if (re-search-forward "disk=\\([^&]+\\)&" nil t)
- (setq webmail-aux
- (concat "http://" site "/cgi-bin/HoTMaiL?disk="
- (match-string 1)))
- (webmail-error "list@2"))
- (goto-char (point-max))
- (while (re-search-backward
- "newmail\\.gif\\|href=\"\\(/cgi-bin/getmsg\\?[^\"]+\\)\""
- nil t)
- (if (setq url (match-string 1))
- (progn
- (if (or newp (not webmail-newmail-only))
- (let (id)
- (if (string-match "msg=\\([^&]+\\)" url)
- (setq id (match-string 1 url)))
- (push (cons id (concat "http://" site url "&raw=0"))
- webmail-articles)))
- (setq newp nil))
- (setq newp t)))))
+ (if (re-search-forward
+ "\\(/cgi-bin/HoTMaiL\\?[^\"]*a=b[^\"]*\\)" nil t)
+ (setq webmail-aux (concat "http://" site (match-string 1)))
+ (webmail-error "login@2"))))
+
+(defun webmail-hotmail-list ()
+ (goto-char (point-min))
+ (skip-chars-forward " \t\n\r")
+ (let (site url newp (total "0"))
+ (if (eobp)
+ (setq total "0")
+ (if (re-search-forward "\\([0-9]+\\) *<b>(\\([0-9]+\\) new)" nil t)
+ (message "Found %s (%s new)" (setq total (match-string 1))
+ (match-string 2))
+ (if (re-search-forward "\\([0-9]+\\) new" nil t)
+ (message "Found %s new" (setq total (match-string 1)))
+ (webmail-error "list@0"))))
+ (unless (equal total "0")
+ (goto-char (point-min))
+ (if (re-search-forward
+ "https?://\\([^/]+hotmail\\.msn\\.com\\)/cgi-bin/" nil t)
+ (setq site (match-string 1))
+ (webmail-error "list@1"))
+ (goto-char (point-min))
+ (if (re-search-forward "disk=\\([^&]*\\)&" nil t)
+ (setq webmail-aux
+ (concat "http://" site "/cgi-bin/HoTMaiL?disk="
+ (match-string 1)))
+ (webmail-error "list@2"))
+ (goto-char (point-max))
+ (while (re-search-backward
+ "newmail\\.gif\\|href=\"\\(/cgi-bin/getmsg\\?[^\"]+\\)\""
+ nil t)
+ (if (setq url (match-string 1))
+ (progn
+ (if (or newp (not webmail-newmail-only))
+ (let (id)
+ (if (string-match "msg=\\([^&]+\\)" url)
+ (setq id (match-string 1 url)))
+ (push (cons id (concat "http://" site url "&raw=0"))
+ webmail-articles)))
+ (setq newp nil))
+ (setq newp t))))))