Hello guys!

Here is my code. My platform is vista.

--------
require 'action_mailer'


class Gmailer < ActionMailer::Base
  def GmailMsg (expe, dest, subj, text, path)
    if path != 0
      mail.attachments[(path.split('\\')[-1])] = File.read(path)
    end
    mail(:to => dest, :subject => subj, :from => expe, :body => text)

  end
end


ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = { :address => 'smtp.gmail.com',
                                         :port => 587,
                                         :domain => 'gmail.com',
                                         :authentication => :plain,
                                         :user_name =>
'*****[email protected]',
                                         :password => '***********'}



message = 'This function works great !'
Gmailer.GmailMsg('*****[email protected]','*****[email protected]','function
test', message, 'C:\testfile.txt').deliver

-----------------------

Everything works fine but the console shows a lot of

C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:305: warning: regexp match
/.../n against to IBM437 string
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:305: warning: regexp match
/.../n against to IBM437 string
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:305: warning: regexp match
/.../n against to IBM437 string
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:305: warning: regexp match
/.../n against to IBM437 string
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:305: warning: regexp match
/.../n against to IBM437 string

What I'm doing wrong? How can I get rid of these?

Thank you.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to