internal cSinglePartBody(string pType, string pSubType, cSection pSection, cBodyStructureParameters pParameters, string pContentId, cCulturedString pDescription, string pContentTransferEncoding, uint pSizeInBytes, cSinglePartExtensionData pExtensionData) : base(pType, pSubType, pSection) { Parameters = pParameters; ContentId = pContentId; Description = pDescription; ContentTransferEncoding = pContentTransferEncoding ?? throw new ArgumentNullException(nameof(pContentTransferEncoding)); if (ContentTransferEncoding.Equals("7BIT", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.none; } else if (ContentTransferEncoding.Equals("8BIT", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.none; } else if (ContentTransferEncoding.Equals("BINARY", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.none; } else if (ContentTransferEncoding.Equals("QUOTED-PRINTABLE", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.quotedprintable; } else if (ContentTransferEncoding.Equals("BASE64", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.base64; } else { DecodingRequired = eDecodingRequired.other; // note that rfc 2045 section 6.4 specifies that if 'unknown' then the part has to be treated as application/octet-stream } SizeInBytes = pSizeInBytes; ExtensionData = pExtensionData; }
internal cEnvelope(DateTime?pSent, cCulturedString pSubject, string pBaseSubject, cAddresses pFrom, cAddresses pSender, cAddresses pReplyTo, cAddresses pTo, cAddresses pCC, cAddresses pBCC, cHeaderFieldMsgIds pInReplyTo, cHeaderFieldMsgId pMessageId) { Sent = pSent; Subject = pSubject; BaseSubject = pBaseSubject; From = pFrom; Sender = pSender; ReplyTo = pReplyTo; To = pTo; CC = pCC; BCC = pBCC; InReplyTo = pInReplyTo; MessageId = pMessageId; }
public readonly string DisplayAddress; // host name should be converted from punycode (rfc 3492) [currently not implemented] // TODO internal cEmailAddress(cCulturedString pDisplayName, string pAddress, string pDisplayAddress) : base(pDisplayName) { Address = pAddress; DisplayAddress = pDisplayAddress; }
internal cAddress(cCulturedString pDisplayName) { DisplayName = pDisplayName; }
internal cGroupAddress(cCulturedString pDisplayName, IList <cEmailAddress> pAddresses) : base(pDisplayName) { Addresses = new ReadOnlyCollection <cEmailAddress>(pAddresses); }
internal cTextBodyPart(string pSubType, cSection pSection, cBodyStructureParameters pParameters, string pContentId, cCulturedString pDescription, string pContentTransferEncoding, uint pSizeInBytes, uint pSizeInLines, cSinglePartExtensionData pExtensionData) : base(kMimeType.Text, pSubType, pSection, pParameters, pContentId, pDescription, pContentTransferEncoding, pSizeInBytes, pExtensionData) { if (SubType.Equals("PLAIN", StringComparison.InvariantCultureIgnoreCase)) { SubTypeCode = eTextBodyPartSubTypeCode.plain; } else if (SubType.Equals("HTML", StringComparison.InvariantCultureIgnoreCase)) { SubTypeCode = eTextBodyPartSubTypeCode.html; } else { SubTypeCode = eTextBodyPartSubTypeCode.other; } SizeInLines = pSizeInLines; }
internal cMessageBodyPart(cSection pSection, cBodyStructureParameters pParameters, string pContentId, cCulturedString pDescription, string pContentTransferEncoding, uint pSizeInBytes, cEnvelope pEnvelope, cBodyPart pBody, cBodyPart pBodyStructure, uint pSizeInLines, cSinglePartExtensionData pExtensionData) : base(kMimeType.Message, kMimeSubType.RFC822, pSection, pParameters, pContentId, pDescription, pContentTransferEncoding, pSizeInBytes, pExtensionData) { Envelope = pEnvelope; mBody = pBody; BodyStructure = pBodyStructure; SizeInLines = pSizeInLines; }