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})
Solved! Go to Solution.
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
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})
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
User | Count |
---|---|
252 | |
102 | |
94 | |
50 | |
37 |