Click here to Skip to main content
15,892,517 members
Articles / Web Development / ASP.NET

Invoke .Net Assembly using SSIS:Email Framework

Rate me:
Please Sign up or sign in to vote.
4.43/5 (3 votes)
21 Oct 2008CPOL3 min read 49.3K   216   27  
This article demonstrate use of SSIS package that helps in invoking .Net Assembly having email component in it.
using System;
using System.Collections.Generic;
using System.Text;

namespace EmailFramework
{
    [Serializable()]
    public class MailContent
    {
        private string m_To = string.Empty;
        private string m_From = string.Empty;
        private bool m_IsBodyHTML;
        private string m_BCC = string.Empty;
        private string m_CC = string.Empty;
        private string m_Subject = string.Empty;
        private Int32 m_MessagePriority;
        private string m_MessageText = string.Empty;
        private string m_AttachmentPath = string.Empty;
        private System.IO.Stream m_AttachmentFileContent;
        private string m_AttachmentFileName = string.Empty;
        private IList<string> m_AttachmentList = null;

        private IList<string> m_ToList = null;
        private IList<string> m_CCList = null;
        private IList<string> m_BCCList = null;
        public string MailTo
        {
            get { return m_To; }
            set { m_To = value; }
        }
        public IList<string> ToList
        {
            get { return m_ToList; }
            set { m_ToList = value; }
        }
        public IList<string> CCList
        {
            get { return m_CCList; }
            set { m_CCList = value; }
        }
        public IList<string> BCCList
        {
            get { return m_BCCList; }
            set { m_BCCList = value; }
        }

        public string MailFrom
        {
            get { return m_From; }
            set { m_From = value; }
        }
        public bool IsBodyHTML
        {
            get { return m_IsBodyHTML; }
            set { m_IsBodyHTML = value; }
        }
        public string MailBCC
        {
            get { return m_BCC; }
            set { m_BCC = value; }
        }
        public string MailCC
        {
            get { return m_CC; }
            set { m_CC = value; }
        }

        public string Subject
        {
            get { return m_Subject; }
            set { m_Subject = value; }
        }
        public Int32 MessagePriority
        {
            get { return m_MessagePriority; }
            set { m_MessagePriority = value; }
        }
        public string AttachmentPath
        {
            get { return m_AttachmentPath; }
            set { m_AttachmentPath = value; }
        }
        public string MessageText
        {
            get { return m_MessageText; }
            set { m_MessageText = value; }
        }
        public System.IO.Stream AttachmentFileContent
        {
            get { return m_AttachmentFileContent; }
            set { m_AttachmentFileContent = value; }
        }
        public string AttachmentFileName
        {
            get { return m_AttachmentFileName; }
            set { m_AttachmentFileName = value; }
        }
        public IList<string> AttachmentList
        {
            get { return m_AttachmentList; }
            set { m_AttachmentList = value; }
        }
        public MailContent()
        {

        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
Australia Australia
Whatsup-->Exploring--> MVC/HTML5/Javascript & Virtualization.......!
www.santoshpoojari.blogspot.com

Comments and Discussions