• I have provided an eg of my the value for my Attachment variable in my previous post, all it is, is a filepath to the file I wish to attach.

    Like I said the code works but only if you provided a value in the @Attachment variable in SSIS, however I dont always want to or need to have an attachment. I did not always want to remove the attachment parameter from my package when I am not sending an attachment in the email.

    I was planning to use this script task as a way to send all types of email or even more than one attachment if necessary.

    I thought this would have been something that many people had tried before but my vb skills are not good so I tried getting help.