Exemplo n.º 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);
 }
Exemplo n.º 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());
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }