I also tried adding the following to models/weboel23.rb--
class Email_Approvals < ActiveRecord::Base
@webemails = WEBEMAIL.EMAL23
User.find_by(:email => @webemails)
and then called it in models/order.rb:
Mailer.deliver_order_distributor_approval_email(@weboel23.get_email, "Coastal Pet Online Ordering<email@example.com>", "DIST Approval-0 ", email_details)
this generates NomethodError (undefined method 'get_email for nil:NilClass':)
Does this mean that it is not connecting to the logical file WEBEMAILS on the AS400? I assume it is connecting because it returns an ibm based error when it doesn't but I am not pulling the emails either.