Opened 7 years ago

Closed 7 years ago

#4120 closed defect (fixed)

Replying to OSM user via email does not work reliably

Reported by: woodpeck Owned by:
Priority: minor Milestone:
Component: website Version:
Keywords: Cc:

Description

I received an user-to-user message from an OSM user this morning and replied to it using my normal E-Mail client.

This resulted in the following error message (user id replaced by xxx yyy):

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. 
The following address(es) failed:

    m-xxxxxx-yyyyyy@messages.openstreetmap.org     local delivery failed 

The following text was generated during the delivery attempt:  

------ m-xxxxxx-yyyyy@messages.openstreetmap.org ------  

/var/lib/gems/1.8/gems/activesupport-3.1.3/lib/active_support/whiny_nil.rb:48:in `method_missing': 
undefined method `decoded' for nil:NilClass (NoMethodError)
 	from /srv/www.openstreetmap.org/rails/script/deliver-message:27 

The mail that I sent was Content-Type: text/plain; charset=UTF-8; format=flowed. Looking at the code line mentioned above, is it possible that the code only works with multipart messages? I found a discussion on StackOverflow? in which someone recommends using something like

plain_part = message.multipart? ? (message.text_part ? message.text_part.body.decoded : nil) : message.body.decoded 

Change History (1)

comment:1 Changed 7 years ago by Tom Hughes

Component: rails_portwebsite
Resolution: fixed
Status: newclosed

Fixed.

Note: See TracTickets for help on using tickets.