Newbie: tls

I want to put RT in the web server checking the mail
server using imap (or pop if it has to) with TLS (that is a must). Can I
do it from within the program? Last time I tried something like that, in
OTRS (2005!), I had to use procmail or something like that to fetch the
mail. Also, to send mail it will also need to do some SASL auth inside TLS.