• Welcome to the upgraded JDELIST forum and thank you for your patience.
    Please restrict discussions and issues regarding the new forum software to the Off Topic forum. We will be monitoring that forum for issues.
    If you have trouble logging in, please reset your password using the forgotten password form: https://www.jdelist.com/community/index.php?lost-password/
    If you are unable to successfully reset your password, please contact us: Click here!
    We hope that you enjoy the upgraded forum.
  • Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Transform - Send Email with variable number of attachments

tboat00

Member
I am looking for someone who has been able to create a solution to send an email message using the Send Mail object with a variable number of attachments. These attachments are images from a known network folder.
I am just not sure how to create the message with a variable number of attachments.
 

JEMILLER

Member
Hi,

You can use a Container object to feed into the Attachments variable on the Send Mail control. The container object should have subcontainers for each attachment structure as: "Each attachment is identified within a subcontainer that contains the name, content, and, optionally, the MIME content type of the attachment." (from the Transform help)

I have put together a sample branch for you. I hope this helps. I am using Transform 5.3 but it shouldn't be much different in v7 if at all.
 

Attachments

tboat00

Member
Justin
Thanks for your insight. My problem was a little more complex as the number of attachments vary with email occurrence of the branch based on the number of attachment files that the user requires.
Anyway, I did finally accomplish this in this manner:

1) Load a bag using Check Directory object gathering all of the file names that need to be attachments.
2) Build a container in the format to mimic the Send Email attachments folder - (Name, Content, Type)
3) Scan the bag from step 1 and load the container accordingly for each file (images) in the list.
4) Substitute the bag container name for the attachments folder in the Send Email object.

Seems to work fine. And, in the meantime, I figured out how advanced container objects work the hard way..

Tim Boatwright
 
Top