Problems with multiple e-mail addresses in xforms

Vote:
 

Hello!

I need to add multiple e-mail addresses in xforms for a button. I add the addresses separated by semi-colons in the field "Send e-mail to this address". When clicking save i get the following error message:

"david.smith@company.com;helen.jones@company.com" is not a valid e-mail address.

In the editors manual for CMS 7 it says:

In Send e-mail to this address, type the e-mail address that a message is to be sent to when a visitor posts a form.
Send e-mails to several recipients by entering the e-mail addresses separated by semi-colons, for example, david.smith@company.com;helen.jones@company.com.
 
Does anyone know what to do with this? I tested it on an alloy-tech sample site as well as my companys site, and got the same error message.
#73966
Aug 15, 2013 16:02
Vote:
 

Hi!

Thanks for the report. This is a bug that was introduced when standardizing our email validation across products. We simply missed that it was possible to enter multiple adresses. I have created the following bug for this:

Bug #104410: Not possible to enter multiple email adresses for xform submit buttons
 
You can do a temporary patch by changing one row in the XFormEdit.aspx file in the system files. Find the row where the emailRegex is defined and change it to this instead:
emailRegex = <%="/^([a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?[;]?)+$/" %>;
#73969
Aug 15, 2013 18:45
Vote:
 

Hi Linus,


There is also a strange thing for xform validation. When I choose data type to email and just click the checkbox for input required field.

When I click the submit button and do not enter anything in textbox, the errormessage 'email is not valid' always appears.

I wonder if I can find a solution to

1. When I input nothing,then required error appears.

2. When I input invalid email. then invalid email error appears.

By the way,I just use xform in my MVC project.

#73975
Aug 16, 2013 3:22
Vote:
 

Thanks Linus!

Your temporary solution works.

#73985
Aug 16, 2013 9:11
Vote:
 

Martin: I fixed the incorrect validation message that appears when using a required email field in MVC but unfortunately there is no easy work around so you will have to live with it until the next release.

#73998
Aug 16, 2013 11:45
Vote:
 

Thanks, Linus. We just wait for the next release.

#73999
Aug 16, 2013 11:48
Vote:
 

Hi Linus

I did the temporary fix as suggested above but I get this message while submitting a form:

An invalid character was found in the mail header
#79607
Dec 22, 2013 18:44
Vote:
 

@Sayeed: I do not recognize the error message so I suggest that you debug the failing mail message to see if you can find the invalid character. The perhaps it's easier to find the cause.

You could also see if you can reproduce this on a clear EPiServer 7.5 site since the original bug should be fixed in this version.

#79655
Edited, Dec 27, 2013 10:31
Vote:
 

Hi Linus

We are using EPiServer 7.1 build 7.0.586.24. It works fine if I have ony one emai address on the xForms "send email to" field. The error only shows up when I try to add multiple email addresses seperated by ";". So this probably has to be an issue with adding multiple email addresses seperated by semicolon. 

#79659
Dec 27, 2013 14:27
Vote:
 

Hi Sayeed, we know about the problem and thus the reference to the bug earlier in this thread. This bug should be fixed in EPiServer 7.5 so if the temporary fix above does not solve this upgrading should remove the bug.

#79671
Dec 29, 2013 10:09
Vote:
 

Hi Sayeed,

I've got exacly the same issue as you in same EPiServer version when using MVC. I fixed that by overriding of ProcessXFormAction. My ProcessXFormAction is defined as below:

protected override bool ProcessXFormAction(System.Web.Mvc.Controller controller, EPiServer.XForms.Util.XFormPostedData post)
{
	var xFormData = new XFormPageHelper().GetXFormData(controller, post);
	xFormData.MailTo = post.SelectedSubmit.Receiver;
   
	try
	{
		return XFormActionHelper.DoAction(xFormData, post, true);
	}
	catch (Exception exception)
	{
		controller.ModelState.AddModelError("ProcessXFormAction", exception.Message);
		return false;
	}
}

    

The only change according to orginal ProcessXFormAction is line starting with 

xFormData.MailTo = post.SelectedSubmit.Receiver;

 

#79870
Edited, Jan 08, 2014 23:56
Vote:
 

Hello Linus,

 

Thanks for your help. We are experiencing the same issue running on EPiServer 7 Patch 3.  And EPiServer 7.1.3

 

Is this item solved in EPiServer 7 Patch 4?

If not:

  • Is there any other way to apply this workaround without having to touch EPiServer file XFormEdit.aspx ?
  • Is there an expectation to fix this for EPiServer 7.1 (Not 7.5)

 

Thank you so much.

- Wacdany.

#85263
Apr 22, 2014 6:21
Vote:
 

Hi,

I am getting the same issue even though our EPiServer assembiles are at version 8.9.

Has this still not been fixed in 8.9?

Thanks,

Nicola

#140617
Oct 26, 2015 7:59
Vote:
 

Just tested this in a 9.2 installation - still not fixed. Tried both semi-colon and colon (as implied in this bug thread).

However, the new Forms module (the much needed replacement for XForms) should be released within weeks. 

#141025
Nov 06, 2015 14:27
Vote:
 

Any news if this is fixed in latest?

#143534
Jan 26, 2016 11:44
Vote:
 

We....want...new...forms

:)

#143695
Jan 28, 2016 23:44
Vote:
 

Well, multiple email recipients is fixed in the new Episerver.Forms. (tested with 0.19.4.9000).

Using a comma-separated list of emails will result in multiple recipients. 

(side note: turns out, when using semi-colon, it's treated as a display name/email pair, so it will be generated as:

TO: "arild@myfirstemail.com" <arild@myotheremail.com> and your mail client will probably get confused. 

#143728
Jan 29, 2016 12:14
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.