Hi opc.three, the truth is your code makes no difference the code works in the same way with or without your code as long as the file path is not specified for the Attacjhment variable it does not work
Whai I was lookinf for was something like
IF myHtmlMessage.Attachments.Add(New Attachment(Dts.Variables("Attachments").Value.ToString)) = ""
myHtmlMessage = New MailMessage(Dts.Variables("From").Value.ToString(), Dts.Variables("To").Value.ToString(), Dts.Variables("Subject").Value.ToString(), Dts.Variables("Body").Value.ToString())
I know the syntax might be wrong but basically if there is no attachment then just send message with the other variables.
I just cant code as good as I would like to so I cant seem to get this working.
I see that you are back to the 'it doesn't work mentality'.
If you don't understand debugging and breakpoints, that's OK - just say so and we can try to help.
But it seems that you're just ignoring our suggestions.
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.