Hello
So this code work's fine for me, BUT i want to be able to send the email with or without pictures
i get error if there is no photo's added. please help.. this is my code, the PDF container works fine.
i can put the pictures in a attachments but that dident help me, pretty new at this..
Office365Outlook.SendEmailV2(
Dropdown2_5.SelectedText.Value,
Subject_2.Text,
"Se bifogad fil.",
{
Cc: "TEST@Email.com",
Attachments: Table(
{
Name: "Inventering.pdf",
ContentBytes: PDF(
Container1_1,
{
Orientation: PaperOrientation.Landscape,
Size: PaperSize.A4,
Margin: "24pt 24pt 24pt 24pt"
}
)
},
{ Name: "Bild1.png",
// Name of the first image attachment
ContentBytes: Image9.Image// Content of the first image attachment
},
{
Name: "Bild2.png",
// Name of the second image attachment
ContentBytes: Image9_1.Image// Content of the second image attachment
}
)
}
);
With(
{
_PDF: Table(
{
Name: "Inventering.pdf",
ContentBytes: PDF(
Container1_1,
{
Orientation: PaperOrientation.Landscape,
Size: PaperSize.A4,
Margin: "24pt 24pt 24pt 24pt"
}
)
}
),
_Image1: Table(
{
Name: "Bild1.png",
ContentBytes: Image9.Image
}
),
_Image2: Table(
{
Name: "Bild2.png",
ContentBytes: Image9_1.Image
}
)
},
Office365Outlook.SendEmailV2(
Dropdown2_5.SelectedText.Value,
Subject_2.Text,
"Se bifogad fil.",
{
Cc: "TEST@Email.com",
Attachments: Table(
_PDF,
If(
YourCondition1Here,
_Image1
),
If(
YourCondition2Here,
_Image2
)
)
}
)
);
WarrenBelz
146,635
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional