Пример #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            StandardEmailMessage standardMessage = new StandardEmailMessage("*****@*****.**", enumMessagePriority.High);

            standardMessage.addToAddress("*****@*****.**");
            standardMessage.addToAddress("*****@*****.**");

            standardMessage.MessageBody = "This Id GOing TO BE how I Test the New Classes.......";

            standardMessage.Subject = "This Is test message testing my new code Sent Via .net!!";

            FileBasedEmailAttachment x = new FileBasedEmailAttachment();

            x.GetAttachment();


            FileImageBasedEmailAttachment y = new FileImageBasedEmailAttachment(32, false);

            y.ClearCreateTempDirectory();
            y.GetAttachment();
            y.AttachemntPath = y.AttachemntPath + "\\" + 32 + "_" + y.AttachmentFullFileName;

            standardMessage.addAttachment(x);
            standardMessage.addAttachment(y);

            standardMessage.SendMessage();
        }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            OutlookEmailMessage outlookMessage = new OutlookEmailMessage("*****@*****.**");

            outlookMessage.addToAddress("*****@*****.**");
            outlookMessage.addToAddress("*****@*****.**");

            // outlookMessage.addBccAddress("brendanw1mweb.co.za");

            outlookMessage.MessageBody = "This Id GOing TO BE how I Test the New Classes.......";

            outlookMessage.Subject = "This Is test message testing my new code Sent Via Outlook!!";

            FileBasedEmailAttachment x = new FileBasedEmailAttachment();

            x.GetAttachment();

            FileImageBasedEmailAttachment y = new FileImageBasedEmailAttachment(32, true);

            y.ClearCreateTempDirectory();
            y.GetAttachment();
            y.AttachemntPath = y.AttachemntPath + "\\" + 32 + "_" + y.AttachmentFullFileName;

            outlookMessage.addAttachment(x);
            outlookMessage.addAttachment(y);

            outlookMessage.SendMessage();
        }