Uwe> I might give it a try but what is the syntax in teh authinfo file > The auth-source info documentation has plenty of gory details I am just digging in, not that clearly written or at least my use case is not easily found. Uwe> My original setting is Uwe> machine smtp.gmail.com login oub@ucm.es port 587 password passwd Uwe> machine UCMgmail login oub@ucm.es password passwd port imaps Uwe> Tassilo suggested Uwe> machine imap.gmail.com login USER@gmail.com password APP_PWD force yes > Most fields in .authinfo are optional, so > machine foo login bar > machine foo login bar port baz > are both legal. For gmail I have > machine imap.gmail.com login USER password APP_PWD port imaps Ok what confuses me if it is better to use smtps or specifying the port directly as in 587, or 465. But I might give it a try either way thanks