--- app/models/mail_handler.rb.orig	2010-01-26 20:59:30.726919895 -0500
+++ app/models/mail_handler.rb	2010-01-26 21:02:27.464719101 -0500
@@ -41,6 +41,7 @@
   def receive(email)
     @email = email
     @user = User.active.find(:first, :conditions => ["LOWER(mail) = ?", email.from.to_a.first.to_s.strip.downcase])
+    @to_user = User.active.find(:first, :conditions => ["LOWER(mail) = ?", email.to.to_a.first.to_s.strip.downcase])
     unless @user
       # Unknown user => the email is ignored
       # TODO: ability to create the user's account
@@ -84,6 +85,7 @@
     # check permission
     raise UnauthorizedAction unless user.allowed_to?(:add_issues, project)
     issue = Issue.new(:author => user, :project => project, :tracker => tracker, :category => category, :priority => priority)
+    issue.assigned_to = @to_user
     # check workflow
     if status && issue.new_statuses_allowed_to(user).include?(status)
       issue.status = status
