app/mailers/rd_mailer.rb
# send an email to the people who requested the data for a particular dataset
send an email to the people who requested the data for a particular dataset
send an email to the people who requested the data for a particular dataset
def notify_requester(dip_id)
    @dip = Dlibhydra::Package.find(dip_id)
    @dataset = Dlibhydra::Dataset.find(@dip.package_ids[0])
    to = @dip.requestor_email.to_a
    to.uniq!
    @dip.requestor_email = ["removed"]
    @dip.save
    mail(to: "Undisclosed Recipients <do-not-reply@york.ac.uk>", bcc: to, subject: 'Requested data now available for download') unless to.empty?
  end
def notify_requester ( dip_id ) @dip = Dlibhydra :: Package . find ( dip_id ) @dataset = Dlibhydra :: Dataset . find ( @dip . package_ids [ 0 ] ) to = @dip . requestor_email . to_a to . uniq! @dip . requestor_email = [ "removed" ] @dip . save mail ( to : "Undisclosed Recipients <do-not-reply@york.ac.uk>" , bcc : to , subject : 'Requested data now available for download' ) unless to . empty? end
send an email to the people who requested the data for a particular dataset
send an email to the people who requested the data for a particular dataset
# get the DIP # and get the dataset that contains this DIP # add the recipients for this dip to the recipient list # remove any duplicates from the recipient list # now that we've sent the dip available notification, delete the requestor email address # send them an email telling them that the data is ready to download
dip_id
<not_specific>