Home Search Member List Faq Register Login  
UltimateEmail
Re: my addresses is always invalid

Thread Starter: pryan00   Started: 10-28-2009 3:38 AM   Replies: 4
 Karamasoft Support Forums » General Discussions » UltimateEmail » Re: my addresses is always invalid
 Printable Version    « Previous Thread   Next Thread »
  28 Oct 2009, 3:38 AM
pryan00 is not online. Last active: 10/28/2009 3:54:11 AM pryan00

Not Ranked
Joined on 10-28-2009
Posts 1
my addresses is always invalid

i want to check my email addresses just syntax.
here the code


Validator
val = new Validator();

ValidationLevel level = val.ValidateEmailAddress(mailadress);

if (level >= ValidationLevel.Syntax)

mail.Bcc.Add(mailadress);

else

DurumLabel.Text = "<br/>"+DurumLabel.Text + mailadress + "<br/>" + level.ToString() + "<br/>"+val.ValidationExpression.ToString();



always returns invalid. where am i wrong?

and here is my own code works good

public static bool MailKontrol(string email)

{

string regExPattern = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +

@"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +

@".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";

Regex regEx = new Regex(regExPattern);

if (email.Length.Equals(0) || !regEx.IsMatch(email))

return false;

else

{

string[] aa = email.Split("@".ToCharArray());

if (aa.Length != 2)

return false;

else

{

if (aa[0].EndsWith("."))

return false;

else

return true;

}

}

}

i give the same validator pattern also does not work.


  
  28 Oct 2009, 8:17 AM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: my addresses is always invalid
What is the email address that you're testing with? If you check http://www.karamasoft.com/UltimateEmail/ServerAPI/index.html you will see that the ValidationExpression property is set to "\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" by default, and you may need to change it.
  
  28 Jan 2010, 11:33 AM
LilMoke is not online. Last active: 1/28/2010 11:49:09 AM LilMoke

Not Ranked
Joined on 01-28-2010
Posts 2
Re: my addresses is always invalid
I have this same problem.  I read the reply, but it does not makes sense, since you explained that you tried your expression as well.

Also, why would the DEFAULT expression ALWAYS return invalid.

If you have a solution please post it here.

Any help with this would be greatly appreciated.

Thanks!

  
  28 Jan 2010, 11:49 AM
LilMoke is not online. Last active: 1/28/2010 11:49:09 AM LilMoke

Not Ranked
Joined on 01-28-2010
Posts 2
Re: my addresses is always invalid
Pryann00, i read thisin the documentation:

Validator server API is only supported in the full version. It always returns Invalid in the free trial version.

Since I like the product, I am going to purchase it.  I will post here if I have the same problem.

As for Karamasoft support, that should have been in te reply message earlier.  I have run a support oranization for many years and we would have marked two strikes against you... LOL!!

Anyway, glad I found the answer.

  
  28 Jan 2010, 11:51 AM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: my addresses is always invalid
This regular expression is provided by Microsoft at http://msdn.microsoft.com/en-us/library/cc511770.aspx. That's why it's being used as the default setting. We don't know what email address you're trying to validate, and get an invalid response. If this pattern doesn't cover your needs, you may change that property to one of the values listed below:

^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$

^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$

  
 Page 1 of 1 (5 items)
Karamasoft Support Forums » General Discussions » UltimateEmail » Re: my addresses is always invalid

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.