MCPcopy Index your code
hub / github.com/sendgrid/sendgrid-nodejs / setFrom

Method setFrom

packages/helpers/classes/mail.js:121–128  ·  view source on GitHub ↗

* Set from email

(from)

Source from the content-addressed store, hash-verified

119 * Set from email
120 */
121 setFrom(from) {
122 if (this._checkProperty('from', from, [this._checkUndefined])) {
123 if (typeof from !== 'string' && typeof from.email !== 'string') {
124 throw new Error('String or address object expected for `from`');
125 }
126 this.from = EmailAddress.create(from);
127 }
128 }
129
130 /**
131 * Set reply to

Callers 3

fromDataMethod · 0.95
set-from.spec.jsFile · 0.45
to-json.spec.jsFile · 0.45

Calls 2

_checkPropertyMethod · 0.95
createMethod · 0.45

Tested by

no test coverage detected