Attachment

getName()

Example
             function process(email) {
      ...
      var attachments = email.getAttachments();
      for (var indexAtt in attachments)
      {
         logAttachment('att', attachments[indexAtt]);
      }
      ...
      
      function logAttachment(label, attachment)
      {
         nlapiLogExecution('DEBUG', 'Att - ' + label + ': ' + attachment.getName() + ', ' + attachment.getType());
         nlapiLogExecution('DEBUG', 'Att - ' + label + ' - value: ' + attachment.getValue());
      }
       ...
   } 

        

getType()

Example
             function process(email) {
      ...
      var attachments = email.getAttachments();
      for (var indexAtt in attachments)
      {
         logAttachment('att', attachments[indexAtt]);
      }
      ...
      
      function logAttachment(label, attachment)
      {
         nlapiLogExecution('DEBUG', 'Att - ' + label + ': ' + attachment.getName() + ', ' + attachment.getType());
         nlapiLogExecution('DEBUG', 'Att - ' + label + ' - value: ' + attachment.getValue());
      }
       ...
   } 

        

getValue()

Example
             function process(email) {
      ...
      var attachments = email.getAttachments();
      for (var indexAtt in attachments)
      {
         logAttachment('att', attachments[indexAtt]);
      }
      ...
      
      function logAttachment(label, attachment)
      {
         nlapiLogExecution('DEBUG', 'Att - ' + label + ': ' + attachment.getName() + ', ' + attachment.getType());
         nlapiLogExecution('DEBUG', 'Att - ' + label + ' - value: ' + attachment.getValue());
      }
       ...
   } 

        

Related Topics

Email Capture Plug-in Interface Description
process(email)
Email
Address

General Notices