cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Melissa33
Helper I
Helper I

How do I get my submitted form to send through the SMPT email

I have a button that when selected sends an email using the SMPT mailgun and sends the email to whatever address i have entered and also submits a form into the database that is connected to the power app, however I want the email to contain the data from the form that is submitted to be within the body of the email. 

 

What I have tried:

SMTP.SendEmailV3("From:" &"email@domain.com & "To:" & "email@domian.com.au" & "?subject=" & " Discharge Issued" 
& "&body=" & Form7.LastSubmit & "%0A"
& "Admission Date: " &DataCardValue81_1.SelectedDate& "%0A"
&"Current Discharge Date: " & DataCardValue85_1.SelectedDate& "%0A"
&"Regards"& "%0A"
&"Ward"), ".")

 

I have also tried:

SubmitForm(Form7);
SMTP.SendEmail({From: "email@domain", To: "Email@domain", subject: Form7.LastSubmit.Subject,
Body:
"Dear Stakeholders,",
Form7.LastSubmit.'Opening Paragraph'
"<br>",
Form7.LastSubmit.'Closing Paragraph'
"Regards",
Form7.LastSubmit.Signiture})

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Melissa33 :

Please try:

SubmitForm(Form7);
SMTP.SendEmail(
   {
     To: "Email@domain", 
     subject: Form7.LastSubmit.Subject,
     Body:
          "Dear Stakeholders," &
          Form7.LastSubmit.'Opening Paragraph' &
          "<br>" &
          Form7.LastSubmit.'Closing Paragraph' &
          "Regards" &
          Form7.LastSubmit.Signiture
    }
)

Best Regards,

Bof

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Melissa33 

Have you tried using the form OnSuccess property?

 

// button click
SubmitForm(Form7);
// Form7 OnSuccess property

SMTP.SendEmail({From: "email@domain", To: "Email@domain", subject: Form7.LastSubmit.Subject,
Body:
"Dear Stakeholders,",
Form7.LastSubmit.'Opening Paragraph'
"<br>",
Form7.LastSubmit.'Closing Paragraph'
"Regards",
Form7.LastSubmit.Signiture})

 

v-bofeng-msft
Community Support
Community Support

Hi @Melissa33 :

Please try:

SubmitForm(Form7);
SMTP.SendEmail(
   {
     To: "Email@domain", 
     subject: Form7.LastSubmit.Subject,
     Body:
          "Dear Stakeholders," &
          Form7.LastSubmit.'Opening Paragraph' &
          "<br>" &
          Form7.LastSubmit.'Closing Paragraph' &
          "Regards" &
          Form7.LastSubmit.Signiture
    }
)

Best Regards,

Bof

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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