Problems receiving emails to open Issues with Imap
I've been googling this for a while with no success. I'm trying to have new issues created on Redmine with users emailing a special user. I followed instructions on Redmine's site (http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails) but something is just not working and the log is not telling me anything and running command with "--trace" is not showing much.
Basically the command I'm launching is:
rake -f /usr/local/lib/redmine/Rakefile redmine:email:receive_imap --trace RAILS_ENV="production" host=my_host port=993 username=my_user password=my_passwd ssl=1 project=my_project tracker=bug allow_override=tracker,priority
I get this:
(in /usr/local/lib/redmine-1.1.2) ** Invoke redmine:email:receive_imap (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute redmine:email:receive_imap
and then it exits but there is no issue created and nothing on production.log. Am I doing something wrong here? I've been reading a lot of forums on this and I don't see what my error might be.
My environment is this:
RAILS_ENV=production script/about /var/lib/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement About your application's environment Ruby version 1.8.7 (x86_64-linux) RubyGems version 1.3.7 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root /usr/local/lib/redmine-1.1.2 Environment production Database adapter postgresql Database schema version 20101114115359 About your Redmine plugins Redmine Attach Screenshot plugin 0.1.0 Issue Importer 0.3.1
Can anyone give me some pointers please?
I'm not a great unix user, is really the
RAILS_ENV="production" part taken into account if inside the whole command line ?
Thanks for your reply Etienne. I already tried setting the environment variable outside of the command and still get the same messages and no issue created.
Thanks for your help.
I've been trying to debug the file app/models/mail_handler.rb to see where is the issue creation failing and I found out that the line where its stopping is:
To check out what was being done there I checked the file app/models/issue.rb but there is no definition for save. Does anyone know where I can find that definition? I'm going insane with this!
Thanks for your help.
It's a RoR ActiveRecord's method, try apidock.com.
But you don't need to go that far, you should try to change your
config/environments/production.rb file to get logging information :
- comment this line:
config.action_mailer.logger = nil
Then restart the app.
RE: Problems receiving emails to open Issues with Imap (Solved) - Added by Jorge Cabrera over 9 years ago
Thank you so much Etienne! I added that to get more out of the logs and finally saw the problem. I was missing the required field "Type", now it works.
Thank you everybody!
I don't hate Redmine no more.
What goes in the Type field? It is not mentioned in the wiki: RedmineReceivingEmails
Guess it's a custom field.
Hi Eric, you need to go in Redmine's interface to Administration and then click on "Custom Fields". I fixed it setting a default value to something. It stopped complaining and now I can open Issues with email.
Hope this helps cause it was a big headache for me.