-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from toyokumo/develop
ver 0.2.3
- Loading branch information
Showing
10 changed files
with
69 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,19 @@ Connection with user authentication:: | |
;; => {:result :success, :code 250, :message "250 OK\n"} | ||
---- | ||
|
||
==== Reply to | ||
|
||
[source,clojure] | ||
---- | ||
(with-open [conn (tarayo/connect {:host "localhost" :port 25})] | ||
(tarayo/send! conn {:from "[email protected]" | ||
:to "[email protected]" | ||
:reply-to "[email protected]" | ||
:subject "hello" | ||
:body "world"})) | ||
;; => {:result :success, :code 250, :message "250 OK\n"} | ||
---- | ||
|
||
==== Attachment file | ||
|
||
[source,clojure] | ||
|
@@ -167,7 +180,7 @@ To generate this parameter, you can use `tarayo.mail.mime`. | |
'[tarayo.mail.session :as session]) | ||
;; => nil | ||
(defn- mime-message->raw-string [mime-msg] | ||
(defn- mime-message->raw-string [^javax.mail.internet.MimeMessage mime-msg] | ||
(let [buf (java.io.ByteArrayOutputStream.)] | ||
(.writeTo mime-msg buf) | ||
(org.apache.commons.codec.binary.Base64/encodeBase64URLSafeString (.toByteArray buf)))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.2.2 | ||
0.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ | |
(sut/add-cc (addr/make-addresses ["[email protected]" "[email protected]"] "utf-8")) | ||
(sut/add-bcc (addr/make-addresses ["[email protected]" "[email protected]"] "utf-8")) | ||
(sut/set-from (addr/make-address "[email protected]" "utf-8")) | ||
(sut/set-reply-to (addr/make-addresses ["[email protected]" "[email protected]"] "utf-8")) | ||
(sut/set-subject "hello, world" "utf-8") | ||
(sut/set-sent-date (.getTime cal)) | ||
(sut/add-headers {"Foo" "Bar" "Bar" "Baz"})))) | ||
|
@@ -58,6 +59,11 @@ | |
(let [msg (gen-test-message)] | ||
(t/is (= #{"[email protected]"} (addrs->set (.getFrom msg)))))) | ||
|
||
(t/deftest set-reply-to-test | ||
(let [msg (gen-test-message) | ||
reply-tos (addrs->set (.getReplyTo msg))] | ||
(t/is (= #{"[email protected]" "[email protected]"} reply-tos)))) | ||
|
||
(t/deftest set-subject-test | ||
(let [msg (gen-test-message)] | ||
(t/is (= "hello, world" (.getSubject msg))))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters