123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::UIDPlusData

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/net/imap/uidplus_data.rb

Overview

NOTE: UIDPlusData is deprecated and will be removed in the 0.6.0 release. To use AppendUIDData and CopyUIDData before 0.6.0, set Config#parser_use_deprecated_uidplus_data to false.

UIDPlusData represents the ResponseCode#data that accompanies the APPENDUID and COPYUID response codes.

A server that supports UIDPLUS should send UIDPlusData in response to the append, copy, move, uid copy, and uid move commands---unless the destination mailbox reports UIDNOTSTICKY.

Note that append, copy and uid_copy return UIDPlusData in their TaggedResponse. But move and uid_move should send UIDPlusData in an UntaggedResponse response before sending their TaggedResponse. However some servers do send UIDPlusData in the TaggedResponse for MOVE commands---this complies with the older UIDPLUS specification but is discouraged by the MOVE extension and disallowed by IMAP4rev2.

Required capability

Requires either UIDPLUS [RFC4315] or IMAP4rev2 capability.

Instance Attribute Summary

  • #assigned_uids rw

    NOTE: UIDPlusData is deprecated and will be removed in the 0.6.0 release. To use AppendUIDData and CopyUIDData before 0.6.0, set Config#parser_use_deprecated_uidplus_data to false.

  • #source_uids rw

    NOTE: UIDPlusData is deprecated and will be removed in the 0.6.0 release. To use AppendUIDData and CopyUIDData before 0.6.0, set Config#parser_use_deprecated_uidplus_data to false.

  • #uidvalidity rw

    NOTE: UIDPlusData is deprecated and will be removed in the 0.6.0 release. To use AppendUIDData and CopyUIDData before 0.6.0, set Config#parser_use_deprecated_uidplus_data to false.

Instance Method Summary

Instance Attribute Details

#assigned_uids (rw)

NOTE: UIDPlusData is deprecated and will be removed in the 0.6.0 release. To use AppendUIDData and CopyUIDData before 0.6.0, set Config#parser_use_deprecated_uidplus_data to false.

UIDPlusData represents the ResponseCode#data that accompanies the APPENDUID and COPYUID response codes.

A server that supports UIDPLUS should send UIDPlusData in response to the append, copy, move, uid copy, and uid move commands---unless the destination mailbox reports UIDNOTSTICKY.

Note that append, copy and uid_copy return UIDPlusData in their TaggedResponse. But move and uid_move should send UIDPlusData in an UntaggedResponse response before sending their TaggedResponse. However some servers do send UIDPlusData in the TaggedResponse for MOVE commands---this complies with the older UIDPLUS specification but is discouraged by the MOVE extension and disallowed by IMAP4rev2.

Required capability

Requires either UIDPLUS [RFC4315] or IMAP4rev2 capability.

[ GitHub ]

  
# File 'lib/net/imap/uidplus_data.rb', line 32

class UIDPlusData < Struct.new(:uidvalidity, :source_uids, :assigned_uids)

#source_uids (rw)

NOTE: UIDPlusData is deprecated and will be removed in the 0.6.0 release. To use AppendUIDData and CopyUIDData before 0.6.0, set Config#parser_use_deprecated_uidplus_data to false.

UIDPlusData represents the ResponseCode#data that accompanies the APPENDUID and COPYUID response codes.

A server that supports UIDPLUS should send UIDPlusData in response to the append, copy, move, uid copy, and uid move commands---unless the destination mailbox reports UIDNOTSTICKY.

Note that append, copy and uid_copy return UIDPlusData in their TaggedResponse. But move and uid_move should send UIDPlusData in an UntaggedResponse response before sending their TaggedResponse. However some servers do send UIDPlusData in the TaggedResponse for MOVE commands---this complies with the older UIDPLUS specification but is discouraged by the MOVE extension and disallowed by IMAP4rev2.

Required capability

Requires either UIDPLUS [RFC4315] or IMAP4rev2 capability.

[ GitHub ]

  
# File 'lib/net/imap/uidplus_data.rb', line 32

class UIDPlusData < Struct.new(:uidvalidity, :source_uids, :assigned_uids)

#uidvalidity (rw)

NOTE: UIDPlusData is deprecated and will be removed in the 0.6.0 release. To use AppendUIDData and CopyUIDData before 0.6.0, set Config#parser_use_deprecated_uidplus_data to false.

UIDPlusData represents the ResponseCode#data that accompanies the APPENDUID and COPYUID response codes.

A server that supports UIDPLUS should send UIDPlusData in response to the append, copy, move, uid copy, and uid move commands---unless the destination mailbox reports UIDNOTSTICKY.

Note that append, copy and uid_copy return UIDPlusData in their TaggedResponse. But move and uid_move should send UIDPlusData in an UntaggedResponse response before sending their TaggedResponse. However some servers do send UIDPlusData in the TaggedResponse for MOVE commands---this complies with the older UIDPLUS specification but is discouraged by the MOVE extension and disallowed by IMAP4rev2.

Required capability

Requires either UIDPLUS [RFC4315] or IMAP4rev2 capability.

[ GitHub ]

  
# File 'lib/net/imap/uidplus_data.rb', line 32

class UIDPlusData < Struct.new(:uidvalidity, :source_uids, :assigned_uids)

Instance Method Details

#uid_mappingnil, a hash

Returns a hash mapping each source UID to the newly assigned destination UID.

Note

Returns nil for Net::IMAP#append.

[ GitHub ]

  
# File 'lib/net/imap/uidplus_data.rb', line 62

def uid_mapping
  source_uids&.zip(assigned_uids)&.to_h
end