Skip to content

Instantly share code, notes, and snippets.

@delihiros
Created September 3, 2014 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delihiros/2507843175fe69740925 to your computer and use it in GitHub Desktop.
Save delihiros/2507843175fe69740925 to your computer and use it in GitHub Desktop.
(ns fishing.core
(:use [postal.core]))
(def teachers
["みせられないよ!@cs.shinshu-u.ac.jp"])
(def mailing-list
(concat
teachers
(for [year (range 12 14)
number (map #(str (apply str (repeat (- 3 (count (str %))) \0)) %) (range 1 109))
alphabet [\h \d \a \g \b \f \k \c \j]]
(str year "T5" number alphabet "@shinshu-u.ac.jp"))))
(defn -main [& args]
(loop [mail-address mailing-list]
(when-not (empty? mail-address)
(println (first mail-address))
(println
(send-message {:host "smtp.gmail.com"
:user "icanspamfish"
:pass "見せられないよ!"
:ssl :yes!!!11}
{:from "icanspamfish@gmail.com"
:to (first mail-address)
:subject "【重要】スパムメールです"
:body [{:type "text/plain"
:content ""}
{:type :inline
:content (java.io.File. "/home/delihiros/spam.jpg")
:content-type "image/jpeg"}]})
(Thread/sleep 5000))
(recur (rest mail-address)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment