Store results from mail command

(4 posts) (2 voices)


No tags yet.

  1. maron, Member

    Is there any way to access the results of the dbr.mail command - for storage in database for example. Currently it outputs to screen the result of the email. But accessing the smtp result would be very helpful.

    (sorry this accidentally ended in the wrong forum)

  2. myDBR Team, Key Master

    There is none at the moment, but adding one would be easy if you need one.

    What do you want to store, the log (success / failure message)?

    myDBR Team

  3. maron, Member

    Yes, the message with the failure / success codes would be good, as about 0.5% will be undeliverable.

  4. myDBR Team, Key Master

    update to newest build and you can use

    select 'dbr.mail.log.proc', 'sp_mail_log';

    The mail log procedure get's two parameters: the message and possible error message.

    create table mail_log (
    sent_at datetime,
    message varchar(255),
    error text null,
    primary key(sent_at)
    ); create procedure sp_mail_log (
    in_msg varchar(255),
    in_error text
    begin insert into mail_log(sent_at, message, error)
    values ( now(), in_msg, in_error ); end

    myDBR Team


You must log in to post.