On Tue, Aug 07, 2012 at 17:38:57 +0000 , Thomas Dean wrote: > Hi there, > > I have succeeded in sending mail to my SMTP server with Mail::Sender > without SSL. But now I'm wondering how to do that with SSL, for example, > GMail. After reading the doc, I set TLS_required to 1 when I'm calling > Mail::Sender->new, but nohing works. I tried to debug the program but > found nothing different whether I turn TLS_required on or not.
You should look at Email::Sender::SMTP::TLS instead--it's the de facto, mature way of sending email through TLS SMTP servers with perl, and is actively supported. Mail::Sender reinvents a lot of wheels, poorly, as you are finding. Also avoid the MIME::Lite suggestion posted, as that module is deprecated and not recommended for new code due to the vagaries and odd bugs in it--also due to the fact that it's not actively maintained or developed any more and just receives an occasional bug fix. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/
pgpPiAnIglL4G.pgp
Description: PGP signature