-1
我目前在我的grails項目中使用了grails郵件插件。以下是版本。爲什麼郵件通過使用Grails郵件插件發送到垃圾郵件或垃圾郵件文件夾
plugins.mail = 1.0.1和我的Grails的版本是app.grails.version = 2.0.3
當我使用sendmail封郵件是要在用戶的垃圾郵件文件夾中的大多數情況下。有什麼辦法可以讓郵件只進入用戶的收件箱。
以下是我的代碼。
def sendNotificationMail(def user, subjectText, bodyText){
println "sending mail"
if(verifyEmailLimit(user)){
try{
mailService.sendMail {
to user.emailAddress
from grailsApplication.config.notificationmail.from
subject subjectText
body bodyText
}
return true
}
catch(Exception ex){
println ex.getMessage()
return false
}
}
else
return false
}
有「來自」帳戶的任何問題?什麼是grailsApplication.config.notificationmail.from值? –
@Miguel Prz notificationmail.from =「[email protected]」 – Deepak