Quickstart
import { EmailEngineStore } from '@quik/communication';
await EmailEngineStore.get('smtp').send({
to: 'user@example.com',
subject: 'Welcome',
text: 'Hi there.'
});
Notes
- There is no top-level
Email.send()helper — engines are registered on per-channel stores (EmailEngineStore,SMSEngineStore,WhatsAppEngineStore) and resolved by name with.get(name). send()is a no-op when the channel'senabledconfig flag isfalse(communication.email.enabled,communication.sms.enabled,communication.whatsapp.enabled).EmailEngineStore.get(name)throwsEngineNotLoadedErrorif no engine was registered under that name — thesmtp/testemail engines are only registered by modulesetup()whennodemaileris installed.- Use
GetEmailEngine()/GetSMSEngine()/GetWhatsAppEngine()as class field decorators to inject the engine configured undercommunication.<channel>.enginewithout hardcoding a name.