[問題] mail hinet 寄信被阻擋
大家好 由於專案需求我必須針對使用者做寄信通知
程式碼如下
def SendMail(strRecipient,strSubject,strContent):
s = smtplib.SMTP('mail.XXX.com.tw')
s.set_debuglevel(1)
msg = MIMEMultipart('alternative')
msg.attach(MIMEText(strContent, 'plain'))
sender = 'notice@ekc.com.tw'
msg['Subject'] = strSubject
msg['From'] = sender
msg['To'] = strRecipient
try:
try:
s.sendmail(sender, strRecipient, msg.as_string())
finally:
s.quit()
except smtplib.SMTPRecipientsRefused, e:
print >> DEBUGSTREAM, 'got SMTPRecipientsRefused'
refused = e.recipients
我寄其他人的如gmail信箱是正常寄信
但是遇到hinet.net的信箱則遇到了問題
Relaying denied. Proper authentication required
我系統使用centos 6.4
python 2.7
相信是某個設定有問題
但很抱歉我搜尋很久依然找不出問題來
希望大家能幫忙我找出問題
謝謝大家:)
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.124.29.189
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1450666850.A.82D.html
→
12/21 11:40, , 1F
12/21 11:40, 1F
→
12/21 11:40, , 2F
12/21 11:40, 2F
→
12/22 12:57, , 3F
12/22 12:57, 3F
Python 近期熱門文章
PTT數位生活區 即時熱門文章