+ def signup_confirm(user, token)
+ with_recipient_locale user do
+ @url = url_for(:host => SERVER_URL,
+ :controller => "user", :action => "confirm",
+ :display_name => user.display_name,
+ :confirm_string => token.token)
+
+ mail :to => user.email,
+ :subject => I18n.t('notifier.signup_confirm.subject')
+ end
+ end
+
+ def email_confirm(user, token)
+ with_recipient_locale user do
+ @address = user.new_email
+ @url = url_for(:host => SERVER_URL,
+ :controller => "user", :action => "confirm_email",
+ :confirm_string => token.token)
+
+ mail :to => user.new_email,
+ :subject => I18n.t('notifier.email_confirm.subject')
+ end
+ end
+
+ def lost_password(user, token)
+ with_recipient_locale user do
+ @url = url_for(:host => SERVER_URL,
+ :controller => "user", :action => "reset_password",
+ :token => token.token)
+
+ mail :to => user.email,
+ :subject => I18n.t('notifier.lost_password.subject')
+ end
+ end
+
+ def gpx_success(trace, possible_points)
+ with_recipient_locale trace.user do
+ @trace_name = trace.name
+ @trace_points = trace.size
+ @trace_description = trace.description
+ @trace_tags = trace.tags
+ @possible_points = possible_points
+
+ mail :to => trace.user.email,
+ :subject => I18n.t('notifier.gpx_notification.success.subject')
+ end
+ end
+
+ def gpx_failure(trace, error)
+ with_recipient_locale trace.user do
+ @trace_name = trace.name
+ @trace_description = trace.description
+ @trace_tags = trace.tags
+ @error = error
+
+ mail :to => trace.user.email,
+ :subject => I18n.t('notifier.gpx_notification.failure.subject')
+ end