Acceptable field type and size for email address?

Guapo picture Guapo · Nov 23, 2011 · Viewed 64.9k times · Source

Possible Duplicate:
Common mySQL fields and their appropriate data types
What are the recommended database column sizes for names?

I am looking for what would be the most correct field type and size to store email address into a mysql table.

I was initially considering varchar 255 but I think 255 might be too much or even too little what is the average size where I would be able to catch all kinda of valid email address ?

Answer

socha23 picture socha23 · Nov 23, 2011

According to RFC 5321, forward and reverse path can be up to 256 chars long, so the email address can be up to 254 characters long. You're safe with using 255 chars.