class ApiUserMailer < ActionMailer::Base
default :from => "noreply@#{ApiUmbrellaConfig[:web][:default_host]}"
def signup_email(user_id, options)
@user = ApiUser.find(user_id)
if(options[:example_api_url].present?)
@example_api_url = options[:example_api_url].gsub("{{api_key}}", @user.api_key)
@formatted_example_api_url = options[:example_api_url].gsub("api_key={{api_key}}", "<strong>api_key=#{@user.api_key}</strong>")
end
@contact_url = options[:contact_url].presence || "**http://#{ApiUmbrellaConfig[:web][:default_host]}/contact/**"
site_name = options[:site_name].presence || ApiUmbrellaConfig[:site_name]