This repository was archived by the owner on Oct 24, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ you can setup the sending options in your app settings like this:
3939```
4040The package will take care of the rest.
4141
42+ > If you use a supported service the package will try to match to supported service and use the stored settings instead.
43+ > You can force this by switching protocol like ` smtp ` to the name of the service.
44+ > Though you should only use this as a stop-gap measure and instead set the settings properly.
45+
4246If neither option is set, ` Email.send ` outputs the message to standard output
4347instead.
4448
@@ -102,6 +106,17 @@ function with addition of `settings` key which will pass in package settings
102106set in your app settings (if any). It is up to you what you do in that function
103107as it will override the original sending function.
104108
109+ Example:
110+ ``` javascript
111+ import { Email } from ' meteor/email'
112+
113+ Email .customTransport = (options ) => {
114+ // `options.settings` are settings from `Meteor.settings.packages.email`
115+ // The rest of the options are from Email.send options
116+ customApi .send ({ from: options .settings .fromOverride || options .from , to: options .to , message: options .html || options .text });
117+ }
118+ ```
119+
105120> Note that this also overrides the development display of messages in console
106121> so you might want to differentiate between production and development for
107122> setting this function.
You can’t perform that action at this time.
0 commit comments