Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • suzyb 474 posts 932 karma points
    Jan 03, 2013 @ 15:39
    suzyb
    0

    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.

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Jan 05, 2013 @ 04:09
    Markus Johansson
    101

    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

  • suzyb 474 posts 932 karma points
    Jan 06, 2013 @ 21:51
    suzyb
    0

    I'm running 1.3 so I guess MailAddress doesn't always like what our regular expression sees as a valid email :/

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Jan 07, 2013 @ 04:40
    Markus Johansson
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft