IPWorks OpenPGP 2020 Node.js Edition

Questions / Feedback?

PartEncoding Property

This property contains the actual content encoding type for each part.

Syntax

 mime.getPartEncoding(index, [callback])
 mime.setPartEncoding(index,  partEncoding, [callback])

Possible Values

  0 (pe7Bit), 
  1 (peQuotedPrintable), 
  2 (peBase64), 
  3 (pe8Bit), 
  4 (peBinary), 
  5 (peUUEncode)

Default Value

0

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getPartEncoding([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setPartEncoding([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This property contains the actual content encoding type for each part. This property determines how to encode the data or how they were actually encoded in the Message as specified in the Content-Transfer-Encoding header.

Possible values for the this property are:

pe7bit (0)7 Bit data, no encoding.
peQuotedPrintable (1)Quoted-Printable encoding of (typically) text.
peBase64 (2)Base64 encoding of binary data.
pe8Bit (3)No encoding, 8 Bit characters may be contained as well.
peBinary (4)Binary data without any encoding. Similar to 3 (8 Bit encoding).
peUUEncode (5)Uuencoding of binary data.

The index parameter specifies the index of the item in the array. The size of the array is controlled by the PartCount property.

This property is not available at design time.

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks OpenPGP 2020 Node.js Edition - Version 20.0 [Build 8249]