Trying to send emails with small attachments since my upgrade is really annoying. I use gmail and usually have to go through Safari to send. I have tried everything suggested including trying to disable autodiscovery in preferences (which can't be found!!) and also using Terminal and the command sqlite3 ~/Library/Mail/V2/MailData/Envelope\ Index vacuum; which comes back with an error. Can anybody help?
Back up all data. That means you know you can restore the Mail database, no matter what happens.
Triple-click the text on the line below to select it:
Copy the selected text to the Clipboard (command-C). In the Finder, select
Go ▹ Go to Folder
from the menu bar. Paste into the box that opens (command-V), then press return.
A Finder window will open with a file selected. Move the selected file to the Desktop, leaving the window open. Other files in the folder may have names that begin with "Envelope Index". Move those files, if any, to the Trash.
Log out and log back in. Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is corrupt and that Mail has to quit. Click OK.
Test. If Mail now works as expected, you can delete the file you moved to the Desktop. Otherwise, post your results.