Skip to content

Instantly share code, notes, and snippets.

@kfriend
Created August 25, 2013 23:31
Show Gist options
  • Save kfriend/6336965 to your computer and use it in GitHub Desktop.
Save kfriend/6336965 to your computer and use it in GitHub Desktop.
Ruby: Simple script for sending HTML email. Great for testing HTML emails.
require 'pony'
raise 'Please specify an email file path' if ARGV.count < 1
html = File.open(ARGV[0])
Pony.mail(
:to => 'to@example.com',
:from => "from@example.com",
:subject => 'Email Test',
:html_body => html.to_a.join
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment