예제 #1
0
 /// <summary>
 /// Creates an empty mail merge message.
 /// </summary>
 public MailMergeMessage()
 {
     Config.IgnoreIllegalRecipientAddresses = true;
     Config.Priority = MessagePriority.Normal;
     SmartFormatter  = GetConfiguredMailSmartFormatter();
     Config.SmartFormatterConfig.OnConfigChanged += SmartFormatter.SetConfig;
     _mailMergeAddresses = new MailMergeAddressCollection(this);
 }
예제 #2
0
 /// <summary>
 /// Determines whether the specified <c>MailMergeAddressCollection</c> instances are equal, i.e. containing the same <c>MailMergeAddress</c>es never mind the sequence.
 /// </summary>
 /// <param name="addressCollection"></param>
 /// <returns></returns>
 protected bool Equals(MailMergeAddressCollection addressCollection)
 {
     if (addressCollection == null)
     {
         return(false);
     }
     // not any address missing in this, nor in the other collection
     return(!this.Except(addressCollection).Union(addressCollection.Except(this)).Any());
 }
예제 #3
0
        /// <summary>
        /// Creates an empty mail merge message.
        /// </summary>
        public MailMergeMessage()
        {
            Config.IgnoreIllegalRecipientAddresses = true;
            Config.Priority = MessagePriority.Normal;
            Headers         = new HeaderList();
            Subject         = string.Empty;

            SmartFormatter = new MailSmartFormatter(this);
            // Smart.Format("{Name:choose(null|):N/A|empty|{Name}}", variable), where abc.Name NULL, string.Emtpy or a string

            MailMergeAddresses = new MailMergeAddressCollection(this);
        }
예제 #4
0
        /// <summary>
        /// Creates an empty mail merge message.
        /// </summary>
        public MailMergeMessage()
        {
            Config.IgnoreIllegalRecipientAddresses = true;
            Config.Priority = MessagePriority.Normal;
            Headers         = new HeaderList();
            Subject         = string.Empty;

            SmartFormatter = new MailSmartFormatter(this);
            // Smart.Format("{Name:choose(null|):N/A|empty|{Name}}", variable), where abc.Name NULL, string.Emtpy or a string

            SmartFormatter.OnFormattingFailure += (sender, args) => { _badVariableNames.Add(args.Placeholder); };

            MailMergeAddresses = new MailMergeAddressCollection(this);
        }
예제 #5
0
        /// <summary>
        /// Creates an empty mail merge message.
        /// </summary>
        public MailMergeMessage()
        {
            Config.IgnoreIllegalRecipientAddresses = true;
            Config.Priority = MessagePriority.Normal;

            if (Config.SmartFormatterConfig == null)
            {
                Config.SmartFormatterConfig = new SmartFormatterConfig();
            }

            SmartFormatter = new MailSmartFormatter(Config.SmartFormatterConfig);
            Config.SmartFormatterConfig.OnConfigChanged += SmartFormatter.SetConfig;
            // Smart.Format("{Name:choose(null|):N/A|empty|{Name}}", variable), where abc.Name NULL, string.Emtpy or a string

            SmartFormatter.OnFormattingFailure += (sender, args) => { _badVariableNames.Add(args.Placeholder); };

            _mailMergeAddresses = new MailMergeAddressCollection(this);
        }