class CustomerMailer < ActionMailer::Base

  def welcome_message(cust_name, cust_email)
    @subject    = "Witaj na naszej stronie"
    @body       = {:name => cust_name, :email => cust_email}
    @recipients = cust_email
    @from       = "webmaster@yourwebsite.com"
    @sent_on    = Time.now

    part(:content_type => "image/jpeg", :disposition => "attachment; filename=welcome.jpg",
         :transfer_encoding => "base64") do |attachment|
      attachment.body = File.read("welcome.jpg")
    end
  end
end