manyuanrong / deno-smtp

SMTP implements for deno
MIT License
80 stars 26 forks source link

Return the object instead of an error if the mail does not exist #45

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi!

I send to a non-existent email and get an error 550: Uncaught (in promise) Error: 550: Message was not accepted -- invalid mailbox. Local mailbox der@mail.ru is unavailable: user is terminated

Can I return the object? for instance:

{
    status: 404,
    payload: Message was not accepted, invalid mailbox
}

Спасибо!