Hi Guys!
I'm sure by now your problems are solved. Nevertheless, let me simplify this for you. I have both my Gmail and my Yahoo mail setup on my E51 and they work beautifully. One thing you should be aware of is that while Gmail offers mobile & POP access free, you need to upgrade to a business account in yahoo to avail the same. That being said, here are the settings for each:
For Gmail:
Connection Settings > Incoming E-Mail
User name: Enter your complete Gmail e-mail address including '@gmail.com'
Password: Enter your Password
Incoming Mail Server: imap.gmail.com
Access Point in Use: Select the active data connection
Mailbox Name: Whatever you like
Mailbox Type: IMAP4
Security (ports): SSL/TLS
Port: Default
Connection Settings > Outgoing E-Mail
My e-mail address: Enter your complete Gmail e-mail address including '@gmail.com'
User name: Again enter your complete Gmail e-mail address including '@gmail.com'
Password: Enter your password
Outgoing Mail Server: smtp.gmail.com
Access Point in Use: Select the active data connection
Security (ports): StartTLS
Port: 587
User Settings:
My Name: Whatever name you'd like to appear in your sent emails
Send Message: Choose 'Immediately' if you would like your phone to connect to the internet and send the message everytime you send an e-mail. Otherwise choose 'during next connection'
Send copy to self: Choose yes if you would like a copy of all mails that you send using your mobile, to be sent to your inbox too.Otherwise choose No.
Include Signature: Your choice. If you choose yes, enter the signature text
New E-Mail alerts: On
Reply to: If you would like people to reply to a different e-mail id then the current one, enter that.Else choose Off.
Delete E-mails From: Select Phone or Server. If you select phone, th emails get deleted only from the phone, although the header still remains till the next time you refresh. What this means is that mails deleted from you phone will continue to remain on your server and will be accessible the next time you access your mail using a PC.
Retrieval Settings:
E-Mail to retrieve: No choice here. Gmail only allows you to retrieve headers first. If you feel a mail is important you can select it and download the entire message later.
Retrieval Amount: Set how many e-mails you would like downloaded
IMAP4 folder path: This is set to 'Unix path' by default. Let it be
Folder Subscriptions: No changes required here
Automatic Retrieval: Select E-mail retrieval and set it to 'Enabled'.
Retrieval Days: All Days
Retrieval Hours: All Hours
Retrieval Interval

et it to 5 mins if you would like e-mails to get downloaded to your phone almost as soon as they arrive (Like Push E-Mail). Else select a time interval as desired.
Yahoo: (Provided you are subscribed to premium business mail)
Connection Settings > Incoming E-Mail
User name: Enter your yahoo user name only (without '@yahoo.com)
Password: Enter your Password
Incoming Mail Server: pop.mail.yahoo.com
Access Point in Use: Select the active data connection
Mailbox Name: Whatever you like
Mailbox Type: POP3
Security (ports): SSL/TLS
Port: Default
APOP secure login: Off
Connection Settings > Outgoing E-Mail
My e-mail address: Enter your complete yahoo e-mail address including '@yahoo.com'
User name: Enter your yahoo user name only (without '@yahoo.com)
Password: Enter your password
Outgoing Mail Server: smtp.mail.yahoo.com
Access Point in Use: Select the active data connection
Security (ports): SSL/TLS
Port: Default
User Settings:
My Name: Whatever name you'd like to appear in your sent emails
Send Message: Choose 'Immediately' if you would like your phone to connect to the internet and send the message everytime you send an e-mail. Otherwise choose 'during next connection'
Send copy to self: Choose yes if you would like a copy of all mails that you send using your mobile, to be sent to your inbox too.Otherwise choose No.
Include Signature: Your choice. If you choose yes, enter the signature text
New E-Mail alerts: On
Reply to: If you would like people to reply to a different e-mail id then the current one, enter that.Else choose Off.
Delete E-mails From: Select Phone or Server. If you select phone, th emails get deleted only from the phone, although the header still remains till the next time you refresh. What this means is that mails deleted from you phone will continue to remain on your server and will be accessible the next time you access your mail using a PC.
Retrieval Settings:
E-Mail to retrieve: Select 'Headers' only to retrieve headers first. If you feel a mail is important you can select it and download the entire message later. Select 'Size Limit' to set a limit to the size of e-mails that can be downloaded. Select 'Msgs. & Attchs' if you want everything to be downloaded.
Retrieval Amount: All
Automatic Retrieval: Select E-mail retrieval and set it to 'Enabled'.
Retrieval Days: All Days
Retrieval Hours: All Hours
Retrieval Interval: Select a time interval as desired.
With this done you should have no poblems accessing both, your yahoo mail and gmail on your E51 over a Wi-Fi connection or a data plan from your service provider.