Beispiel #1
0
        public void Process(MyEmailEventArgs e)
        {
            Console.WriteLine("Forwarding message {0}!!!", e.Subject);
            Chilkat.Email mail = mailMan.FetchEmail(e.Uidl);
            if (mail == null)
            {
                Console.WriteLine("Cannot get the remail {0}", e.Uidl);
                return;
            }
            Chilkat.Email forwardMail = mail.CreateForward();
            forwardMail.From = "*****@*****.**";
            forwardMail.AddTo("Thao Vo", "*****@*****.**");
            bool success = mailMan.SendEmail(forwardMail);

            if (success == false)
            {
                Console.WriteLine(mailMan.LastErrorText);
            }

            PostProcessCommand(e);
        }