cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Send a HTML mail and attachments

Hi all, hope you are fine i have a doubt about how can i send a mail with a HTML format and attachments.

This is the code that im using for the table

 

SubmitForm(Form2_1) ;;
Office365Outlook.SendEmailV2("Cesar.Larrea.Torres@dbschenker.com";"Ticket ID: " & Form2_1.LastSubmit.ID &" - "& Form2_1.LastSubmit.Title;
"
<html>
<head>
<style>
Table {
font-family:arial,sans-serif;
border-Bottom: 1px solid #ddd;
width: 90%;
border-collapse: collapse;
border-spacing: 5px;
}
td {
text-align: center;
padding: 15px;
border-bottom: 1px solid #ddd;
font-size: 12px;
border-collapse: collapse;
}
th {
text-align: center;
padding: 15px;
border-bottom: 1px solid #ddd;
font-size: 12px;
border-collapse: collapse;
}
</style>
</head>
<body>
<h3>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</h3>
<p>A continuacion se tiene un resumen del ticket generado: </a></p>
<table>
<tr>
<th>Problema</th>
<th>Descripcion</th>
<th>Area</th>
<th>Proyecto</th>
<th>Prioridad</th>
<th>Estatus</th>
</tr>"
&
"<tr>
<td>" &  Form2_1.LastSubmit.Title & "</td>
<td>" &  Form2_1.LastSubmit.'Descripcion del problema' & "</td>
<td>" &  Form2_1.LastSubmit.Area.Value & "</td>
<td>" & Form2_1.LastSubmit.Proyecto.Value & "</td>
<td>" & Form2_1.LastSubmit.Prioridad.Value & "</td>
<td>" & Form2_1.LastSubmit.Status.Value & "</td>
</tr>";
{IsHtml: true ; Importance: "High"});;

Navigate(Dashboard;ScreenTransition.Fade) 

 


But the part where im having trobules is the next one:

{IsHtml: true ; Importance: "High"});;

I wanna add attachments to the mail so it can be send it with a image taked from the user. This is the code used for add attachments in other apps but this is the first one using the HTML format:

{Attachments:Table({Name:"SeeError.jpg", ContentBytes:UploadedImage1.Image, '@odata.type':""})}

Can you please help me to check if there is a way to send the email with the HTML format and the image taked from user?

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

3 REPLIES 3
CNT
Super User
Super User

@Anonymous To simplify things, I use variables to store the subject & body (HTML), and use the Attachment control to get the attachments from the user.

 

Office365Outlook.SendEmailV2("person@email.com", varBodyText, varBodyText, {
	From: "person@email.com",
	Bcc: "person@email.com",
	Attachments: AddColumns(RenameColumns(ctrAttachmentControl.Attachments, "Value", "ContentBytes"), "@odata.type", ""),
	Importance: "High"
})

 

I don't think there is a property IsHtml

CNT_0-1622735035810.png

 

CNT
Super User
Super User

@Anonymous Did it work for you?

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

Anonymous
Not applicable

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,802)