473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to do this? EmailMessage.ValidateAddress = false

Hello,

when i uploaded my web site to a server i got this message everytime there
was a form with authentication of an email address:

System.Exception: The FromAddress is not syntactically correct, based upon
the pattern set by EmailMessage.ValidateRegEx: [\w-]+@([\w-]+\.)+[\w-]+ To
turn preliminary email address syntax checking, set
EmailMessage.ValidateAddress = false.

My questions are:
- Why does this happen?
- Where and how to i insert this code to solve this problem:
EmailMessage.ValidateAddress = false

Thanks,
Miguel

Nov 18 '05 #1
4 1240
This is in your own code ? What is the class you are using ?

It looks like the regular expression doesn't allow a dot before the @ sign
(which is sometimes used and works but not allowed in theory).

Patrice

--

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> a écrit dans le message de
news:ON**************@TK2MSFTNGP10.phx.gbl...
Hello,

when i uploaded my web site to a server i got this message everytime there
was a form with authentication of an email address:

System.Exception: The FromAddress is not syntactically correct, based upon
the pattern set by EmailMessage.ValidateRegEx: [\w-]+@([\w-]+\.)+[\w-]+ To
turn preliminary email address syntax checking, set
EmailMessage.ValidateAddress = false.

My questions are:
- Why does this happen?
- Where and how to i insert this code to solve this problem:
EmailMessage.ValidateAddress = false

Thanks,
Miguel

Nov 18 '05 #2
Found it at :
http://www.aspnetemail.com/help/aspn...teaddress.html
In this sample they are adding the line just after the object is created.

You could also use another RegExp to take this into account (if you have
something that doesn't match before the @)

Patrice

--

"Patrice" <no****@nowhere.com> a écrit dans le message de
news:uB**************@TK2MSFTNGP11.phx.gbl...
This is in your own code ? What is the class you are using ?

It looks like the regular expression doesn't allow a dot before the @ sign
(which is sometimes used and works but not allowed in theory).

Patrice

--

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> a écrit dans le message de
news:ON**************@TK2MSFTNGP10.phx.gbl...
Hello,

when i uploaded my web site to a server i got this message everytime there was a form with authentication of an email address:

System.Exception: The FromAddress is not syntactically correct, based upon the pattern set by EmailMessage.ValidateRegEx: [\w-]+@([\w-]+\.)+[\w-]+ To turn preliminary email address syntax checking, set
EmailMessage.ValidateAddress = false.

My questions are:
- Why does this happen?
- Where and how to i insert this code to solve this problem:
EmailMessage.ValidateAddress = false

Thanks,
Miguel


Nov 18 '05 #3
I have something like this:

<td>Write your email: >
<asp:RequiredFieldValidator ID="emailRequired" ControlToValidate="from"
ErrorMessage="?" Display="Dynamic" runat="server" CssClass="redNoteTitle"
ToolTip="Write your
email"></asp:RequiredFieldValidator><asp:RegularExpressionV alidator
ID="emailRegular" ControlToValidate="from" ErrorMessage="?"
Display="Dynamic" runat="server" ToolTip="Invalid Email"
ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
CssClass="redNoteTitle"></asp:RegularExpressionValidator>
</td>

The part of the form is:

<td><asp:TextBox Columns="31" CssClass="greyNoteText" ID="from"
runat="server" ToolTip="Write your email" /></td>

This is very strange because in the same web site i have other forms with
email validation.
But in this one i get this error. Even more strange is that the problem only
happens with the email validation not with the required field.

I did that you said but that's not the problem.

Do you see anything wrong here?

Thanks,
Miguel
"Patrice" <no****@nowhere.com> wrote in message
news:un**************@TK2MSFTNGP09.phx.gbl...
Found it at :
http://www.aspnetemail.com/help/aspn...ateaddress.htm
l In this sample they are adding the line just after the object is created.

You could also use another RegExp to take this into account (if you have
something that doesn't match before the @)

Patrice

--

"Patrice" <no****@nowhere.com> a écrit dans le message de
news:uB**************@TK2MSFTNGP11.phx.gbl...
This is in your own code ? What is the class you are using ?

It looks like the regular expression doesn't allow a dot before the @ sign
(which is sometimes used and works but not allowed in theory).

Patrice

--

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> a écrit dans le message de news:ON**************@TK2MSFTNGP10.phx.gbl...
Hello,

when i uploaded my web site to a server i got this message everytime
there was a form with authentication of an email address:

System.Exception: The FromAddress is not syntactically correct, based upon the pattern set by EmailMessage.ValidateRegEx:
[\w-]+@([\w-]+\.)+[\w-]+ To turn preliminary email address syntax checking, set
EmailMessage.ValidateAddress = false.

My questions are:
- Why does this happen?
- Where and how to i insert this code to solve this problem:
EmailMessage.ValidateAddress = false

Thanks,
Miguel



Nov 18 '05 #4
But the email i inserted has no dot before the @.

"Patrice" <no****@nowhere.com> wrote in message
news:uB**************@TK2MSFTNGP11.phx.gbl...
This is in your own code ? What is the class you are using ?

It looks like the regular expression doesn't allow a dot before the @ sign
(which is sometimes used and works but not allowed in theory).

Patrice

--

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> a écrit dans le message de
news:ON**************@TK2MSFTNGP10.phx.gbl...
Hello,

when i uploaded my web site to a server i got this message everytime there was a form with authentication of an email address:

System.Exception: The FromAddress is not syntactically correct, based upon the pattern set by EmailMessage.ValidateRegEx: [\w-]+@([\w-]+\.)+[\w-]+ To turn preliminary email address syntax checking, set
EmailMessage.ValidateAddress = false.

My questions are:
- Why does this happen?
- Where and how to i insert this code to solve this problem:
EmailMessage.ValidateAddress = false

Thanks,
Miguel


Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
by: Steven Bethard | last post by:
I have lists containing values that are all either True, False or None, e.g.: etc. For a given list: * If all values are None, the function should return None.
15
by: F. Da Costa | last post by:
Hi all, Following two sniperts of code I'm using and getting very interesting results from. ..html <tr id="1" class="segment" open="false"> This is the segment under 'investigation' ..js
3
by: Ben | last post by:
Hi There I am doing some unit testing at the moment, and the majority of the leg work involves taking two objects (expected vs actual) and verifying that their properties are equal. The objects...
13
by: Miguel Dias Moura | last post by:
Hello, i want to display the image "icon-yes.gif" if a certain condition is true or the image "icon-no.gif" if it's false. I have this line: <td><img runat="server" src='<%# "..image/" &...
6
by: Tim::.. | last post by:
Can someone tell me why the value of my Boolean is always false! Even after I have declared that my variable iNews should equal TRUE it seems to remain false... Can some please explain why... ...
4
by: Miguel Dias Moura | last post by:
Hello, when i uploaded my web site to a server i got this message everytime there was a form with authentication of an email address: System.Exception: The FromAddress is not syntactically...
9
by: Thomas Mlynarczyk | last post by:
Hi, It seems to be a generally adopted convention to have a function return FALSE in case of an error. But if a function is supposed to return a boolean anyway, one cannot distinguish anymore...
13
by: kurtj | last post by:
Hello Gurus: I have a validation script (below) that is somehow messed up. If the Name field is blank, I get the alert message, then the browser window goes to a blank document with the word...
20
by: Rajarshi | last post by:
This is a slightly naive question, but I know that 0 can be used to represent False. So True But, I know I can use to represent False as in .... empty
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.