We have our own little control we use to ensure email addresses are valid. We have just received an exception from when we call NewsletterStudio.Api.Subscribe on our form however.
System.ArgumentException: Did not provide a valid e-mail
I can't see any way for our validation not to block (what we consider) invalid emails so could this be cause by newsletter studio seeing something we consider valid as invalid.
How does newsletter studio validate the email address.
I'm currently relaxing in asia so sorry for my late anwser.
It depends on which version of Newsletter Studio you are running. The current version (and since v1.2.1) tries to create a new MailAddress and will return false if the creation fails - due to my research thats the best way to do it since there is lots of different way to implement it using regular expressions.
If you are running an older version than v1.2.1 then the package uses a hard coded regular expression which has some bugs in it. My advice for you wold be to try to upgrade if its possible.
One solution for you would be to install the latest version in a test envorioment to se if it treats the emails differently and to compare any changes. If you are running an older version than 1.3.0 there will be changes in the database. If you have to keep old data you will have to migrate this into the new format.
I guess thats the case, there was problems with the regex that we used to use in Newsletter Studio and when i tried to find a good solution this was what people suggested.
Is it possible for you to use the validation from the Newsletter Studio API?
NewsletterStudio.Api.IsValidEmail(string email) a static method that will return a bool true/false depending on the result.
What is considered a valid email
We have our own little control we use to ensure email addresses are valid. We have just received an exception from when we call NewsletterStudio.Api.Subscribe on our form however.
System.ArgumentException: Did not provide a valid e-mail
I can't see any way for our validation not to block (what we consider) invalid emails so could this be cause by newsletter studio seeing something we consider valid as invalid.
How does newsletter studio validate the email address.
Hi Suzyb!
I'm currently relaxing in asia so sorry for my late anwser.
It depends on which version of Newsletter Studio you are running. The current version (and since v1.2.1) tries to create a new MailAddress and will return false if the creation fails - due to my research thats the best way to do it since there is lots of different way to implement it using regular expressions.
If you are running an older version than v1.2.1 then the package uses a hard coded regular expression which has some bugs in it. My advice for you wold be to try to upgrade if its possible.
One solution for you would be to install the latest version in a test envorioment to se if it treats the emails differently and to compare any changes. If you are running an older version than 1.3.0 there will be changes in the database. If you have to keep old data you will have to migrate this into the new format.
// Markus
I'm running 1.3 so I guess MailAddress doesn't always like what our regular expression sees as a valid email :/
Hi!
I guess thats the case, there was problems with the regex that we used to use in Newsletter Studio and when i tried to find a good solution this was what people suggested.
Is it possible for you to use the validation from the Newsletter Studio API?
NewsletterStudio.Api.IsValidEmail(string email) a static method that will return a bool true/false depending on the result.
is working on a reply...