drewr / postal

Clojure email support
MIT License
586 stars 85 forks source link

com.sun.mail.smtp.SMTPSendFailedException: 451 Auth Fail #68

Closed ezcocoa closed 8 years ago

ezcocoa commented 8 years ago

I got this following error.

com.sun.mail.smtp.SMTPSendFailedException: 451 Auth Fail. Check this URL: http://cs.daum.net/faq/43/9234.html?page=5#33119

com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1215)
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:586)
postal.smtp$smtp_send_STAR_.invoke(smtp.clj:36)
postal.smtp$smtp_send.doInvoke(smtp.clj:58)
clojure.lang.RestFn.invoke(RestFn.java:423)
postal.core$send_message.invoke(core.clj:35)
toeic_score.routes.user$mailto$fn__654.invoke(user.clj:315)
liberator.core$run_handler.invoke(core.clj:178)
liberator.core$handle_created.invoke(core.clj:233)
liberator.core$decide.invoke(core.clj:85)
liberator.core$new_QMARK_.invoke(core.clj:235)
liberator.core$decide.invoke(core.clj:85)
liberator.core$post_redirect_QMARK_.invoke(core.clj:237)
liberator.core$decide.invoke(core.clj:85)
liberator.core$post_BANG_.invoke(core.clj:243)
liberator.core$decide.invoke(core.clj:85)

and this is my code:

(send-message {:host "smtp.daum.net" :port 465 :user "userid" :pass "password" :ssl :yes} {:from "mr.hjbaek@gmail.com" :to "mr.hjbaek@gmail.com" :subject "test" :body "hello"})

It works fine on local. but i deployed this on AWS. it doesn't work for me.

plz help.

drewr commented 8 years ago

From the postal side of things, your message seems legitimate. Perhaps your auth settings don't get populated properly after you deploy?

ezcocoa commented 8 years ago

@drewr thank you. i've solved it. i don't know exactly. the problem is related to lib and version.