Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeform sending duplicate confirmation to users after submission #917

Open
mitchellgemma opened this issue Nov 13, 2023 · 4 comments
Open
Labels
issue Something isn't working correctly

Comments

@mitchellgemma
Copy link

Describe the bug or issue you're experiencing
After a user submits a form, Freeform send 2, identical confirmation emails. I have created a custom template in my codebase that is being sent. I only want the email to be delivered once.

Steps to reproduce

  1. Create a directory within code
  2. Create template
  3. create form and test

Expected behavior
Expecting only 1 email to be delivered

Craft & Plugin Info (please complete the following information):

  • Craft Version: 3.7.50
  • Freeform Version: 3.13.32
  • Freeform Edition: Lite
  • Fresh Install or Upgrade:

Additional context

@mitchellgemma mitchellgemma added the issue Something isn't working correctly label Nov 13, 2023
@kjmartens
Copy link
Contributor

Hi @mitchellgemma,

Are you using the Dynamic Recipients field by chance? And if so, do you have more than one option using the same email address? 🙂

If so, check out this resource:
https://docs.solspace.com/craft/freeform/v4/common-issues/#multiple-emails-being-sent-for-dynamic-recipients-field

@mitchellgemma
Copy link
Author

Hi @kjmartens,

I am not using the Dynamic Recipients field, I'm only using the email field. I've checked everything that may cause the email to be used twice, but I have not come across anything. Thanks!

@kjmartens
Copy link
Contributor

Ok thanks for confirming, @mitchellgemma. 🙂

When you say "confirmation email", is this to the user/submitter? Or the site admin?

Email notifications can be sent 5 different ways, so perhaps you have an extra one configured:

There are a few other things to check:

  1. How many Email fields do you have in your form? If you have more than one, make sure just one of the fields has a notification template assigned to it (if you're referring to the submitter receiving multiple notifications)
  2. Are you using the Dynamic Template Notifications feature? If so, check your templates and see if you are setting an additional email notification to occur there.
  3. I assume the Admin Notifications area in the form builder just has the email address once?
  4. Inside the email notification template itself, do you by chance have the admin email address filled into the CC or BCC settings as well?

@mitchellgemma
Copy link
Author

mitchellgemma commented Nov 14, 2023

Thanks for the information @kjmartens!

I am not using admin notications, dynamic recipients, or dynamic template notifications.

I am slightly confused on the difference between user/submitter notifications and user defined, but I am using 1 of the 2.

I also tried submitting with emails that are not admins on the site, and both emails go to the email that was submitted in the form. I am also positive that there is only 1 email field. If it helps, here is the email template. Is there anything that I MUST include in the template?

{# subject: New submission on your {{ form.name }} form #}
{# fromEmail: {{ craft.app.systemSettings.getSettings('email').fromEmail }} #}
{# fromName: {{ craft.app.systemSettings.getSettings('email').fromName }} #}
{# replyToName: {{ craft.app.systemSettings.getSettings('email').fromName }} #}
{# replyToEmail: {{ craft.app.systemSettings.getSettings('email').fromEmail }} #}
{# cc: #}
{# bcc: #}
{# includeAttachments: true #}
{# presetAssets: #}
{# description: New submission sample email template #}

<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en">

	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta
		name="viewport" content="width=device-width, initial-scale=1.0">
		<!--[if mso]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch><o:AllowPNG/></o:OfficeDocumentSettings></xml><![endif]-->
		<style>
			* {
				box-sizing: border-box;
			}

			body {
				margin: 0;
				padding: 0;
			}

			a[x-apple-data-detectors] {
				color: inherit !important;
				text-decoration: inherit !important;
			}

			#MessageViewBody a {
				color: inherit;
				text-decoration: none;
			}

			p {
				line-height: inherit
			}

			.desktop_hide,
			.desktop_hide table {
				mso-hide: all;
				display: none;
				max-height: 0;
				overflow: hidden;
			}

			.image_block img+div {
				display: none;
			}

			@media(max-width:620px) {
				.desktop_hide table.icons-inner {
					display: inline-block !important;
				}

				.icons-inner {
					text-align: center;
				}

				.icons-inner td {
					margin: 0 auto;
				}

				.mobile_hide {
					display: none;
				}

				.row-content {
					width: 100% !important;
				}

				.stack .column {
					width: 100%;
					display: block;
				}

				.mobile_hide {
					min-height: 0;
					max-height: 0;
					max-width: 0;
					overflow: hidden;
					font-size: 0;
				}

				.desktop_hide,
				.desktop_hide table {
					display: table !important;
					max-height: none !important;
				}
			}
		</style>
	</head>

	<body style="background-color: #fff; margin: 0; padding: 0; -webkit-text-size-adjust: none; text-size-adjust: none;">
		<table class="nl-container" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #fff;">
			<tbody>
				<tr>
					<td>
						<table class="row row-1" align="center" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
							<tbody>
								<tr>
									<td>
										<table class="row-content stack" align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #000; width: 600px; margin: 0 auto;" width="600">
											<tbody>
												<tr>
													<td class="column column-1" width="100%" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; padding-bottom: 5px; padding-top: 5px; vertical-align: top; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;">
														<table class="image_block block-1" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
															<tr>
																<td class="pad" style="width:100%;">
																	<div class="alignment" align="center" style="line-height:10px"><img src="https://aafa3dfcd5.imgdist.com/public/users/Integrators/BeeProAgency/961163_945708/Screenshot%202023-11-13%20at%2012.27.51%20PM.png" style="display: block; height: auto; border: 0; max-width: 600px; width: 100%;" width="600"></div>
																</td>
															</tr>
														</table>
														<table class="image_block block-2" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
															<tr>
																<td class="pad" style="width:100%;">
																	<div class="alignment" align="center" style="line-height:10px">
																		<a href="https://optimise2.assets-servd.host/nyc-dance/production/assets/images/2023-2024-ad.jpeg?w=1870&auto=compress%2Cformat&fit=crop&dm=1687192812&s=8f4e8929ebd69596ff654fa1619af0cd" target="_blank" style="outline:none" tabindex="-1"><img src="https://aafa3dfcd5.imgdist.com/public/users/Integrators/BeeProAgency/961163_945708/Screenshot%202023-11-13%20at%2012.31.06%20PM.png" style="display: block; height: auto; border: 0; max-width: 600px; width: 100%;" width="600"></a>
																	</div>
																</td>
															</tr>
														</table>
														<table class="image_block block-3" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
															<tr>
																<td class="pad" style="width:100%;">
																	<div class="alignment" align="center" style="line-height:10px">
																		<a href="https://www.nycdance.com/regionals/scholarships-special-opportunities" target="_blank" style="outline:none" tabindex="-1"><img src="https://aafa3dfcd5.imgdist.com/public/users/Integrators/BeeProAgency/961163_945708/Screenshot%202023-11-13%20at%2012.33.11%20PM.png" style="display: block; height: auto; border: 0; max-width: 600px; width: 100%;" width="600"></a>
																	</div>
																</td>
															</tr>
														</table>
														<table class="image_block block-4" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
															<tr>
																<td class="pad" style="width:100%;">
																	<div class="alignment" align="center" style="line-height:10px">
																		<a href="https://www.nycdance.com/foundation/scholarship-opportunities" target="_blank" style="outline:none" tabindex="-1"><img src="https://aafa3dfcd5.imgdist.com/public/users/Integrators/BeeProAgency/961163_945708/Screenshot%202023-11-13%20at%2012.34.43%20PM.png" style="display: block; height: auto; border: 0; max-width: 600px; width: 100%;" width="600"></a>
																	</div>
																</td>
															</tr>
														</table>
														<table class="image_block block-5" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
															<tr>
																<td class="pad" style="width:100%;">
																	<div class="alignment" align="center" style="line-height:10px">
																		<a href="https://www.nycdance.com/intensives" target="_blank" style="outline:none" tabindex="-1"><img src="https://aafa3dfcd5.imgdist.com/public/users/Integrators/BeeProAgency/961163_945708/Screenshot%202023-11-13%20at%2012.35.45%20PM.png" style="display: block; height: auto; border: 0; max-width: 600px; width: 100%;" width="600"></a>
																	</div>
																</td>
															</tr>
														</table>
														<table class="image_block block-6" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
															<tr>
																<td class="pad" style="width:100%;">
																	<div class="alignment" align="center" style="line-height:10px">
																		<a href="https://www.nycdance.com/intensives" target="_blank" style="outline:none" tabindex="-1"><img src="https://aafa3dfcd5.imgdist.com/public/users/Integrators/BeeProAgency/961163_945708/Screenshot%202023-11-13%20at%2012.36.30%20PM.png" style="display: block; height: auto; border: 0; max-width: 600px; width: 100%;" width="600"></a>
																	</div>
																</td>
															</tr>
														</table>
													</td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
		</table>
		<!-- End -->
	</body>

</html>


{# /text #}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue Something isn't working correctly
Development

No branches or pull requests

2 participants