0

I collect all Mails from a pop server with Mail.all

 @currentmails = Mail.all
  # Über alle Mails im Postfach Iterieren
  @currentmails.each do | mail |
    puts mail.to
  end

But mail.to doesn't work ... I got this error:

NoMethodError: undefined method `gsub' for ["mail@HOST.de"]:Mail::AddressContainer

Mail Recipient (to) Looks like this:

<To: <mail@HOST.de>>
lurker
  • 56,987
  • 9
  • 69
  • 103
Felix
  • 5,452
  • 12
  • 68
  • 163

1 Answers1

0

mail.to.to_s

is the solution of the problem.

Felix
  • 5,452
  • 12
  • 68
  • 163