How to use the lob.addresses function in lob

To help you get started, we’ve selected a few lob examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github motdotla / retromail / task.js View on Github external
execute(command, function(stdout) {
        var email     = new sendgrid.Email();
        email.to      = EMAIL;
        email.from    = EMAIL;
        email.subject = '[retromail] '+unix_time;
        email.text    = 'Attached is your retromail from '+unix_time;
        email.addFile({ path: output_path });

        sendgrid.send(email, function(err, json) {
          if (err) { return console.error(err); }
          console.log(json);
        });

        lob.addresses.create({
          name:             NAME,
          email:            EMAIL,
          address_line1:    ADDRESS_LINE1,
          address_line2:    ADDRESS_LINE2,
          address_city:     ADDRESS_CITY,
          address_state:    ADDRESS_STATE,
          address_zip:      ADDRESS_ZIP,
          address_country:  ADDRESS_COUNTRY 
        }, function(err, res) {
          var lob_address = res;

          lob.objects.create({
            name: output_path,
            file: "@"+output_path,
            setting_id: 100
          }, function(err, res) {

lob

Lob API wrapper

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis