2012-06-10 5 views
0

에 파이썬으로 localhost를 통해 전송되는 I 이메일 보낼 수있는 다음과 같은 간단한 코드가 있습니다이메일되지는 우분투

server = smtplib.SMTP('localhost') 
server.set_debuglevel(1) 
server.sendmail(fromaddr, toaddrs, msg) 
server.quit() 

메시지를 보낸 결코 극복 그러나합니다. 나는 문제를 해결하기위한 시도에서 "set_debuglevel"라인을 추가되지만 출력은 나에게 많은 것을 의미하지 않는다 : 나는 후위를 설치 한

send: 'ehlo [127.0.1.1]\r\n' 
reply: '250-ubuntu\r\n' 
reply: '250-PIPELINING\r\n' 
reply: '250-SIZE 10240000\r\n' 
reply: '250-VRFY\r\n' 
reply: '250-ETRN\r\n' 
reply: '250-STARTTLS\r\n' 
reply: '250-ENHANCEDSTATUSCODES\r\n' 
reply: '250-8BITMIME\r\n' 
reply: '250 DSN\r\n' 
reply: retcode (250); Msg: ubuntu 
PIPELINING 
SIZE 10240000 
VRFY 
ETRN 
STARTTLS 
ENHANCEDSTATUSCODES 
8BITMIME 
DSN 
send: 'mail FROM:<[email protected]> size=337\r\n' 
reply: '250 2.1.0 Ok\r\n' 
reply: retcode (250); Msg: 2.1.0 Ok 
send: 'rcpt TO:<[email protected]>\r\n' 
reply: '250 2.1.5 Ok\r\n' 
reply: retcode (250); Msg: 2.1.5 Ok 
send: 'data\r\n' 
reply: '354 End data with <CR><LF>.<CR><LF>\r\n' 
reply: retcode (354); Msg: End data with <CR><LF>.<CR><LF> 
data: (354, 'End data with <CR><LF>.<CR><LF>') 
send: 'Hello!\r\n\r\nThe below URLs are either broken or taking too long to respond:\r\nhttp://www.google.com/does-not-exist/\r\nhttp://www.cnn.com/does-not-exist\r\n\r\nLog in and navigate to http://blahblah.com/wp-admin to update the content.\r\n\r\nThanks,\r\n\r\nYour friends at Foo Bar Consulting\r\n.\r\n' 
reply: '250 2.0.0 Ok: queued as E7B8820144\r\n' 
reply: retcode (250); Msg: 2.0.0 Ok: queued as E7B8820144 
data: (250, '2.0.0 Ok: queued as E7B8820144') 
send: 'quit\r\n' 
reply: '221 2.0.0 Bye\r\n' 
reply: retcode (221); Msg: 2.0.0 Bye 

(나는 내가 내 우분투를 설정할 때 기본적으로 설치 믿는다 표준 램프 패키지)하지만 도움을 청할 곳은 어디인지 알 수 없습니다.

모든 통찰력이나 아이디어는 크게 감사하겠습니다.

답변

0
  1. 당신이 센드 메일의 로그

  2. 로컬 DNS 작동 확인을 확인 할 수 있습니다. 시도하십시오 ping foobarconsulting.com

+0

내 우분투 서버에서 도메인을 ping 할 수 있습니다. 불행히도 센드 메일 로그에는 오늘 날짜 (6 월 10 일)에 대한 정보도 없으므로 의미가 없습니다. – Adam