select case when email_bouncing_p = 't' then 1 else 0 end as send_p from users, parties where lower(email) = lower(:email) and party_id = user_id select case when email_bouncing_p = 't' then 1 else 0 end as send_p from users where user_id = :user_id update acs_mail_lite_mail_log set last_mail_date = sysdate where party_id = :user_id insert into acs_mail_lite_mail_log (party_id, last_mail_date) values (:user_id, sysdate) update acs_mail_lite_bounce set bounce_count = bounce_count + 1 where party_id = :user_id insert into acs_mail_lite_bounce (party_id, bounce_count) values (:user_id, 1) delete from acs_mail_lite_bounce where party_id in (select party_id from acs_mail_lite_mail_log where last_mail_date < sysdate - :max_days_to_bounce) update users set email_bouncing_p = 't' where user_id in (select party_id from acs_mail_lite_bounce where bounce_count >= :max_bounce_count) delete from acs_mail_lite_bounce where bounce_count >= :max_bounce_count select person_id as user_id, first_names || ' ' || last_name as user_name from parties, persons where email = :email and party_id = person_id order by party_id desc limit 1 delete from acs_mail_lite_queue where message_id = :message_id select * from acs_mail_lite_reply_prefixes where prefix = :package_prefix