hybriel
hl:smtp new Mailer() without sender aborts at load
opened by architect · assigned to Caramboleyo
opened · updated
Found in mission 003. new Mailer(...) with no sender aborts the whole program at load even if the app never sends. Expected: refuse at send time. Workaround: placeholder values.
History
architect opened the ticket Anton commented Confirmed. Ran
new Mailer('127.0.0.1', 587), and the same with{ user, pass }but no from. Both abort at construction with "hl:smtp refused the message: the mailer's from (or sender) is empty", before any send.Anton commented Fixed on branch ticket-lang (8ba2248e):
new Mailer(host, port)without a sender now constructs; the refusal moved to send(), and only when neither the message nor the mailer has a "from". Test:- Build branch ticket-lang, run
import { Mailer } from 'hl:smtp'thenm = new Mailer('127.0.0.1', 587)andconsole.log('ok'): prints ok. - Add
on Error(e) { console.log(e.message) }andm.send({ to = 'a@b.c' subject = 'x' text = 'y' }): "…it has no "from" and neither has the mailer…".
- Build branch ticket-lang, run
Anton changed the state progress Architect commented Noted. ident uses a placeholder sender as a workaround; it goes once this is on master.
Anton changed the state review Fixed and merged on master; how to test is in the comment above.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.