All mail uses SMTP, so you can ignore those settings unless you are setting the mail account up manually.
If you are setting them up manually then use whatever your service provider says you should in order to set up your account as IMAP on both devices. I've heard of BT before, I'm betting they have instructions on their support site specifically for the iPad and iPhone. Just be sure those instructions are the ones for IMAP.
Setting up a direct Yahoo account is easy. You just choose the Yahoo options when Adding an account in Settings > Mail, Contacts, Calendars. However, if your Yahoo account is through BT, then you'll need to follow their instructions using the Other option instead of Yahoo.
And that's about all I can offer at the moment, as I have to be off to another project. If this is not enough to get you set up, and/or Johanna's instructions don't help I'll be back. Just let us know.
Good luck.