Skip to content

Instantly share code, notes, and snippets.

@devth
Created August 19, 2012 04:02
Show Gist options
  • Save devth/3391828 to your computer and use it in GitHub Desktop.
Save devth/3391828 to your computer and use it in GitHub Desktop.
# Email the file
#
ActionMailer::Base.smtp_settings = smtp_settings.merge({"port" => '25'})
puts "Using smtp config"
puts ActionMailer::Base.smtp_settings
ActionMailer::Base.delivery_method = :smtp
# Set AM's view path
ActionMailer::Base.view_paths = ['.']
# Deliver the email
UserMailer.email_export(send_to, csv_file).deliver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment