Ruby Large HTML emails getting error, limit to header size

Posted by Joe Stein on Stack Overflow See other posts from Stack Overflow or by Joe Stein
Published on 2010-06-08T02:56:13Z Indexed on 2010/06/08 3:52 UTC
Read the original article Hit count: 272

Filed under:
|
def mailTo(subject,msg,folks)
begin
Net::SMTP.start('localhost', 25) do |smtp|
  smtp.send_message "MIME-Version: 1.0\nContent-type: text/html\nSubject: #{subject}\n#{msg}\n#{DateTime.now}\n", '[email protected]', folks
end


rescue => e
    puts "Emailing Sending Error - #{e}"
  end
end

when the HTML is VERY large I get this exception

Emailing Sending Error - 552 5.6.0 Headers too large (32768 max)

how can i get a larger html above max to work with Net::SMTP in Ruby

© Stack Overflow or respective owner

Related posts about ruby

Related posts about smtp