send mails to group email

Send email to the group email address, if defined. Otherwise to all group members like before.

Still working on one test case failure, but creating request for review purposes.
On Mittwoch, 8. Oktober 2014, 00:39:24 wrote Stephan Kulow:
> > @@ -17,9 +17,10 @@ def mail_sender
> >      'OBS Notification <' + ::Configuration.first.admin_email + '>'
> >    end
> >  
> > -  def format_email(user)
> > -    address = Mail::Address.new user.email
> > -    address.display_name = user.realname
> > +  def format_email(user_or_group)
> > +    address = Mail::Address.new user_or_group.email
> > +    address.display_name = user_or_group.realname if user_or_group.kind_of? User
> > +    address.display_name = user_or_group.title if user_or_group.kind_of? Group
> >      address.format
> 
> Please give User and Group a display_name function instead of this

makes sense, done.

-- 

Adrian Schroeter
email: adrian@suse.de

SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5                         
90409 Nürnberg 
Germany