>From <http://mail.google.com/support/bin/answer.py?answer=78799>

Incoming Mail (IMAP) Server - requires SSL: imap.gmail.com
Use SSL: Yes
Port: 993
Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587
Account Name: your full email address (including @gmail.com) Google Apps users, please enter username@your_domain.com
Email Address: your full Gmail email address (username@gmail.com) Google Apps users, please enter username@your_domain.com
Password: your Gmail password

May be you need to use Net::SMTP::TLS <http://search.cpan.org/~awestholm/Net-SMTP-TLS-0.12/> so you can do a STARTTLS. Ie start with a clear text protocol and then upgrade to a TLS encrypted protocol.


Kenneth Thorman wrote:
Hi Renée

I changed the script to the following (this is my small test script not the actual OTRS installation)


print "$@\n";
if (not $smtp = Net::SMTP::SSL->new('smtp.gmail.com',
                                     Port => 465,
                                     Debug => 1)) {
print "$@\n";
   die "Could not connect to mail server\n";
}



The output is

root@XXXXXXXXXX ~ #./perl_test_email_gmail.pl

Net::SMTP::SSL: Bad service ''
Could not connect to mail server

Regards
Kenneth Thorman

On Mon, Apr 12, 2010 at 12:32 PM, Renée Bäcker <mailinglisten@renee-baecker.de> wrote:
Kenneth Thorman schrieb:

my $smtp;
if (not $smtp = Net::SMTP::SSL->new('smtp.gmail.com',
                                    Port => 465,
                                    Debug => 1)) {
  die "Could not connect to mail server\n";
}
 

Can you print the value of $@?


my $smtp;
if (not $smtp = Net::SMTP::SSL->new('smtp.gmail.com',
                                   Port => 465,
                                   Debug => 1)) {
 die "Could not connect to mail server -> $@\n";
}


- Renée

--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de


---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/


--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW! http://www.otrs.com/en/support/enterprise-subscription/


-- 
Dr. Rodney G. McDuff                 |Ex ignorantia ad sapientiam
Manager, Strategic Technologies Group|    Ex luce ad tenebras
Information Technology Services      |
The University of Queensland         |
EMAIL: mcduff@its.uq.edu.au          |
TELEPHONE: +61 7 3365 8220           |