

Ask / Tell YC: Maximum email field length - cjc

When collecting email addresses, how many characters do you guys usually allow for? Most google results say "320 characters" is the limit, but I've never met someone with such a preposterously long email address.<p>I did some digging and found that the IETF recommends lines in message headers contain no more than 78 characters. This is to avoid some software from inadvertently truncating or poorly wrapping a long message header. Therefore, if one line contains "from: email@address.com", an email address should contain no more than 72 characters (78 - the 6 characters 'from: ').<p>In practice, I usually accept 128 characters, but I guess that's just always been a willy-nilly decision.<p>Anyway, does anyone have more insight?<p>p.s. I'm bringing this up because my 33 character email address didn't work at DivvyShot and I became ENRAGED.
======
mcav
If space isn't a concern, and you're using e-mail verification, I'd set it to
allow however long the RFC allows for... invalid addresses would be found
through the verification e-mail, rather than an arbitrary length constraint.
That said, my startup's database seems to be set at 50 characters, and I'm not
worried about it yet.

------
Jem
I allow 255 max in my various databases (varchar(255)), although in reality
I've never come across an email address longer than 50 characters.

------
thepanister
Well, It's weird... my 32 charachter email address does not work at DivvyShot
too! I reported the report, but no response. They accept 30 charachters only,
but I see no reason for that!

I think it's so important to give your users the most wider options, so you
never miss a user, specially when it comes to the signup page! Users won't
wait for you.. they will just be pissed off and leave!

Personally, I make it 155 charchters in my databases... I lose nothing to do
so! But I think that 90 charachters look so reasonable.

~~~
enki
i see the reason for that:

django/contrib/auth/models.py: username = models.CharField(_('username'),
max_length=30

fail. had to work around this before.

~~~
thepanister
This is not the reason I am talking about! I mean: I see no "technical"
reason!

Is it possible to change: max_length=30 to any other int? like 50 or 90? It's
not good to have a system that lacks even the most simple things!

