cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nsexton
Frequent Visitor

Using HTML to format SendEmail function

Hello,

 

I have been working on creating a simple app to send an email that contains the link of a survey when a button is pushed. All of the basic functionality is working I just do not know how to format the text inside the email. Here is the code inside the button function: 

 

Office365Outlook.SendEmail(Email_DataCard1.Default,"Test Survey 2", Title_DataCard1.Default & "," & Char(10) & Char(10) & "Please Complete Sample Survey Here: survey.com") 

 

I would like to use 11 point Calibri font if at all possible. 

 

Thank you all in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions

hi @nsexton,

 

I have corrected some syntax errors in your code:

Office365Outlook.SendEmail(
Email_DataCard1.Default,
"Test Survey 2",
"<p style='font-family:calibri' size=11>"& Title_DataCard1.Default &",Please Complete Sample Survey Here: survey.com </font><br> ",
{
IsHtml:true,
Importance: "Normal"
}
)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Hi @nsexton ,

 

You can absolutely do whatever you want, try the below code:

Office365Outlook.SendEmail(
Email_DataCard1.Default,
"Test Survey 2",
"<img src='https://www.w3schools.com/images/lamp.jpg' alt='Lamp' width='32' height='32'><p style='font-family:calibri' size=11>"& Title_DataCard1.Default &",Please Complete Sample Survey Here: survey.com </font><br> ",
{
IsHtml:true,
Importance: "Normal"
}

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

5 REPLIES 5
KrishnaV
Super User
Super User

Hi @nsexton ,

 

Try this below code:

Office365.SendEmail(
       "abc@abc.com",
       "Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & " (Bell Ref: " &ThisItem.BellRef & ")", 
       "<p style="font-family:calibri" size=11> Bell Customer Report</font><br> ", 
        {
           IsHtml:true,
           Importance: "Normal"
       }
)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
nsexton
Frequent Visitor

Here is what my code looks like now, but it is giving me an Expected Operator error. 

 

Office365Outlook.SendEmail(
Email_DataCard1.Default,
"Test Survey 2",
"<p style="font-family:calibri" size=11> Title_DataCard1.Default & "," & Char(10) & Char(10) & "Please Complete Sample Survey Here: survey.com "</font><br> ",
{
IsHtml:true,
Importance: "Normal"
}
)

hi @nsexton,

 

I have corrected some syntax errors in your code:

Office365Outlook.SendEmail(
Email_DataCard1.Default,
"Test Survey 2",
"<p style='font-family:calibri' size=11>"& Title_DataCard1.Default &",Please Complete Sample Survey Here: survey.com </font><br> ",
{
IsHtml:true,
Importance: "Normal"
}
)


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
nsexton
Frequent Visitor

Thank you for your help! Just for fun, do you know would i would be able to add an image into the email as well?

Hi @nsexton ,

 

You can absolutely do whatever you want, try the below code:

Office365Outlook.SendEmail(
Email_DataCard1.Default,
"Test Survey 2",
"<img src='https://www.w3schools.com/images/lamp.jpg' alt='Lamp' width='32' height='32'><p style='font-family:calibri' size=11>"& Title_DataCard1.Default &",Please Complete Sample Survey Here: survey.com </font><br> ",
{
IsHtml:true,
Importance: "Normal"
}

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,493)