Обсуждение: FW: Re: type for storing emails?

Поиск
Список
Период
Сортировка

FW: Re: type for storing emails?

От
stan
Дата:
On Mon, Nov 11, 2019 at 12:29:03PM -0600, Rene Romero Benavides wrote:
> On Mon, Nov 11, 2019 at 11:59 AM stan <stanb@panix.com> wrote:
> 
> > Does anyone have a type they have developed for storing emails. I need
> > to do that, and the things that are in my thoughts on this are storing it
> > as
> > a derived type of citext, as case should not matter, and enforcing the at
> > sign with pretty much anything on the left side of it, and something that
> > looks like a domain on the right side of it.
> >
> >
> > --
> > "They that would give up essential liberty for temporary safety deserve
> > neither liberty nor safety."
> >                                                 -- Benjamin Franklin
> >
> >
> >
> How are you going to handle invalid / non existent emails?
> 

For the moment, I am just going to verify that what is entered is a valid
email format. Verifying that the email exists, may come later.

Thanks for making me think about this, though.

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                        -- Benjamin Franklin



Sv: FW: Re: type for storing emails?

От
Andreas Joseph Krogh
Дата:
På tirsdag 12. november 2019 kl. 16:07:47, skrev stan <stanb@panix.com>:
[...]
For the moment, I am just going to verify that what is entered is a valid
email format. Verifying that the email exists, may come later.

Thanks for making me think about this, though.
 
 
Note that it's only possible to verify that the email-address is correctly structured and a syntactically correct. There is no way to verify that an email-address actually exists, ie. that a recipient will receive emails sent to it.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 
Вложения

Re: FW: Re: type for storing emails?

От
Steve Midgley
Дата:


On Tue, Nov 12, 2019 at 7:21 AM Andreas Joseph Krogh <andreas@visena.com> wrote:
På tirsdag 12. november 2019 kl. 16:07:47, skrev stan <stanb@panix.com>:
[...]
For the moment, I am just going to verify that what is entered is a valid
email format. Verifying that the email exists, may come later.

Thanks for making me think about this, though.
 
 
Note that it's only possible to verify that the email-address is correctly structured and a syntactically correct. There is no way to verify that an email-address actually exists, ie. that a recipient will receive emails sent to it.

Not to be pedantic but in the data model, you could have a couple of verification data fields (e.g. verification_code; email_verified), and actually send an email and record if the user comes back with the correct verification code. It's obviously not something that can be handled solely via specs or database, but a data model can accommodate actual email verification (as I know you know, but thought I should make clear for future readers of the archives).
 
Вложения

Re: FW: Re: type for storing emails?

От
Andreas Joseph Krogh
Дата:
På tirsdag 12. november 2019 kl. 16:50:35, skrev Steve Midgley <science@misuse.org>:
[...]
Not to be pedantic but in the data model, you could have a couple of verification data fields (e.g. verification_code; email_verified), and actually send an email and record if the user comes back with the correct verification code. It's obviously not something that can be handled solely via specs or database, but a data model can accommodate actual email verification (as I know you know, but thought I should make clear for future readers of the archives).
 
My point is;  There is no way to tecnichally verify that an email actually «exists» (as in being active and will be routed to an actual recipient). Yes, you can do all sorts of acrobatics, and may in many attempts succeed, but there exists no method guaranteeing this. Many email-servers will for example happily receive the email, respond "OK, got it", but throw the email in an "unknown recipients"-bin, effectively ignoring any email sent to a non-existing address.
 
--
Andreas Joseph Krogh