Skip to main content

mailgun@0.6.1

send(params)

This adaptor exports the following from common:

alterState
beta
dataPath()
dataValue()
each()
field()
fields()
fn()
fnIf()
lastReferenceValue()
merge()
sourceValue()

Functions

send

send(params)

Create an event

ParamTypeDescription
paramsobjectParams for sending an email

Example

// Fetch attachment from URL
send({
from: 'from_email',
to: 'to_email',
subject: 'Your Subject',
text: 'Your message goes here',
attachment: {
url: 'www.google.com/doodle.png',
filename: 'forYou.png',
},
})

Example

// Attach from base64 string
send({
from: 'admin@openfn.org',
to: 'email@example.com',
subject: 'Your invoice',
text: 'Please find your invoice attached',
attachment: {
filename: 'invoice.pdf',
data: $.data // base64 string
},
})