cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nsexton
New Member

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
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
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 III
Super User III

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
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.

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
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

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
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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (59,322)