Search code examples
iossmtpxcode4.2imap

separate authentication for IMAP and SMTP?


I'm working on an iOS app through which user can read and send messages from his email account.

My question is that once user is logged in into IMAP server for reading mails, he has to login separately into SMTP server for sending mail? or the question can be vice versa, once he is logged in into SMTP server he have to login separately into IMAP server for reading email.


Solution

  • I'm not entirely sure what your question is, but yes. For IMAP/SMTP, the incoming and outgoing components are completely separate protocols, and don't even have to be on the same server (and often aren't: see imap.gmail.com and smtp.gmail.com), so yes, they need to be logged in to separately. Usually, they're the same username and password, but that's not even always true.