나는 사람들의 목록에 이메일을 보낼 스크립트를 작성 중이고이 이메일에는 첨부 파일이있을 것입니다. 나는이 문제에 대해 계속 실행포니 젬으로 Ruby에서 첨부 파일이있는 이메일 보내기
:
/usr/local/lib/ruby/1.9.1/net/smtp.rb:942:in 'check_response': 552 sorry, that message size exceeds my databytes limit (#5.3.4) (Net::SMTPFatalError)
첨부 파일 만 1백10킬로바이트
코드 :
Pony.mail(
:to => to,
:from => 'Me <[email protected]>',
:subject => html_entity_decoder.decode(options[:subject]),
:html_body => "#{options[:body]}".html_safe,
:attachments => {File.basename("#{attachment}") => File.read("#{attachment}")},
:headers => { "Content-Type" => "multipart/mixed", "Content-Transfer-Encoding" => "base64", "Content-Disposition" => "attachment" },
:via => :smtp,
:via_options => {
:address => ADDRESS,
:port => '25',
:enable_starttls_auto => true,
:user_name => USERNAME,
:password => PWD,
:authentication => :plain,
:domain => DOMAIN
}
)
잘못 될 수 있는지에 대한 어떤 생각?
흠 ... 이상하다 ... 내 Gmail 계정에서 나에게 테스트 이메일을 보내고있다. 거기에 방 수가있다. 나는 SMTP 포트를 587 (기본값) 대신 25로 변경했고, 이제는 실행 만기 된 오류가 발생하고있다 ... – dennismonsewicz
서버의 테스트 머신, 설치 프로그램이 뭐지? – macarthy
나는 로컬에서 테스트 중입니다 ... 서버에 넣고 무슨 일이 일어날 지 알 것입니다 ... – dennismonsewicz