Opened 9 years ago

Closed 9 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:


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:     local delivery failed 

The following text was generated during the delivery attempt:  

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

/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/ 

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 9 years ago by Tom Hughes

Component: rails_portwebsite
Resolution: fixed
Status: newclosed


Note: See TracTickets for help on using tickets.