Esempio n. 1
0
        internal static string GetHeaderValue(Header header, InboundConversionOptions options)
        {
            int lengthLimit = (options != null) ? options.Limits.MaxMimeTextHeaderLength : 2000;

            return(MimeHelpers.GetHeaderValue(header, lengthLimit));
        }
Esempio n. 2
0
 internal static string GetHeaderParameter(ComplexHeader header, string parameterName, InboundConversionOptions options)
 {
     return(MimeHelpers.GetHeaderParameter(header, parameterName, options.Limits.MaxMimeTextHeaderLength));
 }
Esempio n. 3
0
 internal static string GetHeaderValue(HeaderList headers, HeaderId headerId, InboundConversionOptions options)
 {
     return(MimeHelpers.GetHeaderValue(headers.FindFirst(headerId), options));
 }
Esempio n. 4
0
        public static Charset ChooseCharset(string partCharset, string messageCharset, InboundConversionOptions conversionOptions)
        {
            Charset charset = MimeHelpers.GetValidAndTrustedCharset(partCharset, conversionOptions);

            if (charset != null)
            {
                return(charset);
            }
            charset = MimeHelpers.GetValidAndTrustedCharset(messageCharset, conversionOptions);
            if (charset != null)
            {
                return(charset);
            }
            charset = conversionOptions.DefaultCharset;
            if (charset != null && charset.IsAvailable)
            {
                return(charset);
            }
            return(Culture.Default.MimeCharset);
        }
Esempio n. 5
0
 public ICalInboundContext(Charset charset, IList <LocalizedString> errorStream, InboundAddressCache addressCache, InboundConversionOptions options, CalendarReader reader, uint?maxBodyLength, bool hasExceptionPromotion) : base(charset, errorStream, addressCache)
 {
     Util.ThrowOnNullArgument(options, "options");
     if (!options.IgnoreImceaDomain)
     {
         Util.ThrowOnNullOrEmptyArgument(options.ImceaEncapsulationDomain, "options.ImceaEncapsulationDomain");
     }
     Util.ThrowOnNullArgument(reader, "reader");
     this.Options               = options;
     this.Reader                = reader;
     this.MaxBodyLength         = maxBodyLength;
     this.HasExceptionPromotion = hasExceptionPromotion;
     this.DeclaredTimeZones     = new Dictionary <string, ExTimeZone>(StringComparer.OrdinalIgnoreCase);
 }
Esempio n. 6
0
 protected override void BuildAttachments(BodyConversionCallbacks callbacks, InboundConversionOptions optionsForSmime)
 {
 }
Esempio n. 7
0
 protected override void BuildAttachments(BodyConversionCallbacks callbacks, InboundConversionOptions optionsForSmime)
 {
     base.CopyAttachments(callbacks, this.originalItem.AttachmentCollection, this.newItem.AttachmentCollection, false, this.parameters.TargetFormat == BodyFormat.TextPlain, optionsForSmime);
 }