ID: 1GvJKygDvrhoq9w1FIRepBo1kAB3yo1LucHtL6CIM-KqmaFaxLUbyBdim
Blastengine.init('YOUR_USER_NAME', 'YOUR_API_KEY');const transaction = Blastengine.transaction();transaction.fromEmail = '[email protected]';
transaction.setTo('[email protected]');
transaction.subject = 'Test subject';
transaction.setText('Test body');
const res = transaction.send();
console.log(res);
// { delivery_id: 188 }const file = DriveApp.getFileById('DRIVE_FILE_ID');
const response = UrlFetchApp.fetch('https://example.com/logo.jpg');File attached.
transaction.addAttachment(file.getBlob());
transaction.addAttachment(response.getBlob());const res = transaction.send();
console.log(res);
// { delivery_id: 189 }const bulk = Blastengine.bulk();bulk.fromEmail = '[email protected]';
bulk.subject = 'Test subject';
bulk.setText('Text body with __name__');
const res = bulk.register();
console.log(res);
// { delivery_id: 189 }bulk.setTo('[email protected]', {
'name': 'User 1',
});
bulk.setTo('[email protected]', {
'name': 'User 2',
});
bulk.update();bulk.send();bulk.delete();MIT