+(defcustom spam-report-resend-to nil
+ "Email address that spam articles are resent to when reporting.
+If not set, the user will be prompted to enter a value which will be
+saved for future use."
+ :type 'string
+ :group 'spam-report)
+
+(defvar spam-report-url-ping-temp-agent-function nil
+ "Internal variable for `spam-report-agentize' and `spam-report-deagentize'.
+This variable will store the value of `spam-report-url-ping-function' from
+before `spam-report-agentize' was run, so that `spam-report-deagentize' can
+undo that change.")
+
+(defun spam-report-resend (articles &optional ham)
+ "Report an article as spam by resending via email.
+Reports is as ham when HAM is set."
+ (dolist (article articles)
+ (gnus-message 6
+ "Reporting %s article %d to <%s>..."
+ (if ham "ham" "spam")
+ article spam-report-resend-to)
+ (unless spam-report-resend-to
+ (customize-set-variable
+ spam-report-resend-to
+ (read-from-minibuffer "email address to resend SPAM/HAM to? ")))
+ ;; This is ganked from the `gnus-summary-resend-message' function.
+ ;; It involves rendering the SPAM, which is undesirable, but there does
+ ;; not seem to be a nicer way to achieve this.
+ ;; select this particular article
+ (gnus-summary-select-article nil nil nil article)
+ ;; resend it to the destination address
+ (save-excursion
+ (set-buffer gnus-original-article-buffer)
+ (message-resend spam-report-resend-to))))
+
+(defun spam-report-resend-ham (articles)
+ "Report an article as ham by resending via email."
+ (spam-report-resend articles t))
+
+(defun spam-report-gmane-ham (&rest articles)
+ "Report ARTICLES as ham (unregister) through Gmane."
+ (interactive (gnus-summary-work-articles current-prefix-arg))
+ (dolist (article articles)
+ (spam-report-gmane-internal t article)))
+
+(defun spam-report-gmane-spam (&rest articles)
+ "Report ARTICLES as spam through Gmane."
+ (interactive (gnus-summary-work-articles current-prefix-arg))