when i click on submit data stored in database but that email user Enter in form so i want to send a email notification on that email..
if email is invalid so give a alert message Email Invalid. please help community......Thank you
Loading
when i click on submit data stored in database but that email user Enter in form so i want to send a email notification on that email..
if email is invalid so give a alert message Email Invalid. please help community......Thank you
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted May 18, 2024, 1:13 PM
Hello Soheb,
If you want to just email address is valid or not then you need to check with below code.
If you want to check with ReGex then you need to use below code.
or if you want to check the user has provided email address is correct or not then you need to please refer below links for validate.
https://verifalia.com/validate-email
https://hunter.io/email-verifier
https://www.neverbounce.com/email-verification
Thanks
Prasad RaveendranPosted May 17, 2024, 6:58 PM
I would request you to provide the technology which you have been using to develop the Front end and sevices so that we can provide appropriate solution/suggestions
if you are using .NET 6.0 , in API, you can provide the below code at model level
the
[EmailAddress]data annotation attribute is available in .NET 6.0. This attribute is used to validate that a property contains a valid email address.in service endpoint, you can validate the model as below
Hope this may help
Abhishek ChadhaPosted May 17, 2024, 5:42 PM
check with regex if the email is valid or not
you can pass the entered email to const email
Jayraj ChhayaPosted May 17, 2024, 10:27 AM
To achieve this functionality in a .NET application, you can use the
SmtpClientclass from theSystem.Net.Mailnamespace to send an email notification. First, validate the email address using regular expressions or built-in .NET methods. If the email is valid, send the email; otherwise, display an alert message.Remember to replace
"[email protected]","smtp.yourserver.com", and the email validation logic according to your application requirements.