Jump to content
Sign in to follow this  
Allow2010

How to do this for X attachments?

Recommended Posts

Hello,

i need to do something like this:

$oEmail.Attachments(1).Fields.Item("urn:schemas:mailheader:content-disposition") = "attachment"
$oEmail.Attachments(1).Fields.Item("urn:schemas:mailheader:content-transfer-encoding") = "base64"
$oEmail.Attachments(1).Fields.Update
$oEmail.Attachments(2).Fields.Item("urn:schemas:mailheader:content-disposition") = "attachment"
$oEmail.Attachments(2).Fields.Item("urn:schemas:mailheader:content-transfer-encoding") = "base64"
$oEmail.Attachments(2).Fields.Update

As i do not know how many attachments are needed, i will have to do it for every added attachment.

$oEmail.Attachments(X).Fields.Item("urn:schemas:mailheader:content-disposition") = "attachment"

Is there a way to do this?

Thanks for your ideas and hints 🙂

 

Share this post


Link to post
Share on other sites

yes, but i can not just use

$oEmail.Attachments($i).Fields.Item("urn:schemas:mailheader:content-disposition") = "attachment"

as this is some kind of variable name 🙂

At least i think so .-)

Edited by Allow2010

Share this post


Link to post
Share on other sites

Ah, forget it, it does work...i just misinterpreted the syntax, i thought i had to create the varibale name to call it...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...