1
我試圖做一個EmailSender在我的應用程序的Java的Sendmail無法打開和負載的郵件服務器屬性文件
我做的I幀的電子郵件,和我與谷歌搜索一些爲例,可以幫助我,
所以我覺得這是政黨成員是非常有用的 http://www.javapractices.com/topic/TopicAction.do?Id=144
,但我不明白是什麼意思這個配置
# Configuration file for javax.mail
# If a value for an item is not provided, then
# system defaults will be used. These items can
# also be set in code.
# Host whose mail services will be used
# (Default value : localhost)
mail.host=mail.blah.com
# Return address to appear on emails
# (Default value : [email protected])
[email protected]
# Other possible items include:
# mail.user=
# mail.store.protocol=
# mail.transport.protocol=
# mail.smtp.host=
# mail.smtp.user=
# mail.debug=
運行之後,我有這個錯誤,
Cannot open and load mail server properties file.
Cannot send email. javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
幫助,並感謝