thx, i have already try this module, but i don't how to  port all off the
code for SSL, this is the coud ported for now

[CODE]
#!/bin/perl

use Mail::Internet;
use Mail::POP3Client;
use IO::Socket::SSL;
use CGI qw(:standard);
$cgi = new CGI;
use LWP::UserAgent;


$username  = '[email protected]';
$password  = 'horizon';

$mailhost  = 'pop.gmail.com'; #examplepop.gmail.com
$port      = '995'; #995

print $cgi->header();

$pop = Mail::POP3Client->new(USER     => $username,
PASSWORD => $password,
HOST     => $mailhost,
PORT     => $port,
USESSL   => 'true',
DEBUG     => 0,) or die("ERROR: Unable to connect to mail server.\n");


if (($pop->Count()) < 1) {
print "No messages...\n";
exit;
}

my $Messages = $pop->Count;
my ($MsgDel,$MsgNo);
my ($MsgId, $MsgDate, $MsgFrom, $MsgTo, $MsgSub, $Delivred_To, $Content);
my ($MsgAttach, $MsgSize, $MsgHeader, $MsgHeadFlg, $MsgBody,
$MIME_Version, $Received_Time, $Origin_IP);

foreach $MsgNo ( $Messages)  {
  my $MsgContent = $pop->HeadAndBody($MsgNo);
  my $count = 0;
  $MsgHeadFlg = 0;
  $MsgBody = "";

(my $Mesaj_NR, my $MsgSize) = split('\s+',$pop->List($MsgNo));

print $MsgSize . "Marime mesaj \n";
print $Mesaj_NR . "Nr. Mesaj \n";
print $MsgContent . " \n";
print $MsgNo . " \n";

 # Process message data
  while()
  {

    # Exit if last line of mail
    if ($count >= scalar(@$MsgContent))
    {
      #print $MsgContent . "count";
        last;
    }

    # Check if end of mail header
    if (@$MsgContent[$count] =~ /^\n/)
    {
      $MsgHeadFlg = 1;
    }

    # Proceed if message header not processed
    if (not $MsgHeadFlg)
    {

      # Split the line
      my @LineContent = split /: /, @$MsgContent[$count];

      # Check Header Info
      SWITCH:
      {

        #Get MIME Version
        $LineContent[0] =~ /MIME-Version/i && do
                                       {
                                         $MIME_Version = $LineContent[1];
last SWITCH;
                                       };
        #Get Time Of recived
        $LineContent[0] =~ /Received/i && do
                                       {
                                         $Received_Time = $LineContent[1];
last SWITCH;
                                       };
        #Get IP of sender
        $LineContent[0] =~ /X-Originating-IP/i && do
                                       {
                                         $Origin_IP = $LineContent[1];
last SWITCH;
                                       };
        #Get Date
        $LineContent[0] =~ /Date/i && do
                                       {
                                         $MsgDate = $LineContent[1]; last
SWITCH;
                                       };
        #Get Delivred To
        $LineContent[0] =~ /Delivered-To/i && do
                                       {
                                         $Delivred_To = $LineContent[1];
last SWITCH;
                                       };
        # Get message id
        $LineContent[0] =~ /Message-ID/i && do
                                       {
                                         $MsgId = $LineContent[1]; last
SWITCH;
                                       };
        # Get message subject
        $LineContent[0] =~ /Subject/i && do
                                      {
                                        $MsgSub = $LineContent[1]; last
SWITCH;
                                      };

        # Get message from
        $LineContent[0] =~ /From/i && do
                                      {
                                        $MsgFrom = $LineContent[1]; last
SWITCH;
                                      };

        # Get message to
        $LineContent[0] =~ /To/i && do
                                      {
                                        $MsgTo = $LineContent[1];
                                        last SWITCH;
                                      };
        # Get Content type
        $LineContent[0] =~ /Content-Type/i && do
                                      {
                                        $Content = $LineContent[1]; last
SWITCH;
                                      };
      }
    }
    else
    {
      # Process message body
      $MsgBody .= @$MsgContent[$count];
    }
    $count++;
}

my $ua = new LWP::UserAgent;
$ua->timeout(120);
#my $result =  `ps -e | grep  -v grep|grep smsbox |awk \'{print \$1}\'`;
my $result = true;

   if ( $result  ne  ""  )
    {
print $MsgSub . "subiect mesaj \n";
print $MsgBody . "continut mesaj \n";
        my
$url="http://kennel.domain.com:13013/cgi-bin/sendsms?username=kennel_user&password=kenel_passwd&to=$MsgSub&text=$MsgBody";;
        my $request = new HTTP::Request('GET', $url);
        my $response = $ua->request($request);
        my $content = $response->content();
        $MsgDel = $pop->Delete($MsgNo)
    }
}

# Disconnect from pop3 server
$pop->close();

exit;

[\CODE]

please help me for the rest of porting to SSL

> I copied my answer to your personal email address, like I am doing
now... so
> you should have gotten it:
>
> Try this module instead:
>
> http://search.cpan.org/~sdowd/Mail-POP3Client-2.17/POP3Client.pm
>
> == Rene
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
Behalf Of Zaharia Constantin
> Sent: Saturday, 28 August, 2010 22:11
> To: [email protected]
> Subject: Re: Kannel and POP3 google SSL
>
> sorry, i don't get any answers, i have been accepted only today in the
list. i don't know what is answer Rene.
>
> sorry again for the spamm
>
>> Send users mailing list submissions to
>>      [email protected]
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>      http://www.kannel.org/mailman/listinfo/users
>> or, via email, send a message with subject or body 'help' to
>>      [email protected]
>>
>> You can reach the person managing the list at
>>      [email protected]
>>
>> When replying, please edit your Subject line so it is more specific
than "Re: Contents of users digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: Getting DLR reports for AT SMSC (Nikos Balkanas)
>>    2. Re: Kannel and POP3 google SSL (Nikos Balkanas)
>>    3. Re: Getting DLR reports for AT SMSC (Gjergji Guri)
>>    4. Re: Getting DLR reports for AT SMSC (Nikos Balkanas)
>>    5. Re: Getting DLR reports for AT SMSC (Alvaro Cornejo)
>>    6. Re: Getting DLR reports for AT SMSC (Gjergji Guri)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Sat, 28 Aug 2010 14:35:46 +0300
>> From: "Nikos Balkanas" <[email protected]>
>> To: "Gjergji Guri" <[email protected]>,  <[email protected]>
Subject: Re: Getting DLR reports for AT SMSC
>> Message-ID: <b3686b42580048fdbfc4b2ad57c15...@drwho>
>> Content-Type: text/plain; format=flowed; charset="windows-1253";
>>      reply-type=original
>>
>> Yes, and it works. Note that using a GSM modem is more reliable than a
phone. Some providers do not send DLRs to a phone.
>>
>> But what do you mean by http SMSc? A GSM modem is different than an
HTTP smsc.
>>
>> BR,
>> Nikos
>> ----- Original Message -----
>> From: Gjergji Guri
>> To: [email protected]
>> Sent: Saturday, August 28, 2010 10:39 AM
>> Subject: Getting DLR reports for AT SMSC
>>
>>
>> Hi,
>>
>> I have no problem to get DLR report for http SMSC by setting the
correct dlr-mask and dlr-url. Nevertheless, though my modem driver and
network support receiving delivery reports the bearerbox do not process
any delivery
>> reports.
>>
>> At page 64 of the User Guide (Feature checklist) or Table 6-2. SMSC driver
>> features I can see that for AT driver the ?Can Use DLR? is set to N.
Nevertheless, N is set even for http request where the delivery is
working
>> fine in my configuration.
>>
>> Do I need to setup some specific processing for the incoming SMS delivery
>> reports retrieved by the AT modem?
>>
>> Has anyone configured delivery reports with Kannel using a modem (AT SMSC
>> driver)?
>>
>> Any hint, guidance?
>>
>> Cheers,
>> Gjergji
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Sat, 28 Aug 2010 14:37:31 +0300
>> From: "Nikos Balkanas" <[email protected]>
>> To: <[email protected]>,   <[email protected]>
>> Subject: Re: Kannel and POP3 google SSL
>> Message-ID: <ca645d15b4694ad59761fcefc0f27...@drwho>
>> Content-Type: text/plain; format=flowed; charset="windows-1253";
>>      reply-type=original
>>
>> Holly spam! Didn't you send 2 identical emails yesterday? And didn't Rene
>> answered you?
>>
>> Spamming the list is not the way to get help.
>>
>> Nikos
>> ----- Original Message -----
>> From: "Zaharia Constantin" <[email protected]>
>> To: <[email protected]>
>> Sent: Saturday, August 28, 2010 7:53 AM
>> Subject: Kannel and POP3 google SSL
>>
>>
>>> hy,
>>> is it posible ?
>>> i have found a pearl script for that, but is not for SSL support, and for
>>> Gmail is not working, is it posibile to modify this script for SSL
support?
>>> i have made some modification on the script but still not working.
this is
>>> the script...
>>>
>>> http://www.kannel.org/pipermail/users/2008-July/005309.html
>>>
>>> Constantin Zaharia
>>> Romania
>>> --
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Sat, 28 Aug 2010 14:30:35 +0200
>> From: Gjergji Guri <[email protected]>
>> To: Nikos Balkanas <[email protected]>
>> Cc: [email protected]
>> Subject: Re: Getting DLR reports for AT SMSC
>> Message-ID:
>>      <[email protected]>
>> Content-Type: text/plain; charset="windows-1252"
>>
>> Many thanks Nikos and good to hear that it works.
>>
>> I've configured DLR callback with Clickatell (system-type = clickatell)
having the smsc variable set to http. This is configured as a separate
SMSC
>> and I have no problem with processing DLR.
>>
>> I've configure a HUAWEI E618 Mobile Connect - 3G Modem and can send SMS
messages using HTTP Push service.
>>
>> In my current configuration I do not see the dlr-url to be called, when I
>> use the GSM modem, which works when message is routed via clickatell.
>>
>> Do I need to make any specific configuration for the GSM modem smsc in
order
>> for the delivery status reports to be processed?
>>
>>
>> Kind Regards,
>> Gjergji
>>
>>
>>
>> 2010/8/28 Nikos Balkanas <[email protected]>
>>
>>> Yes, and it works. Note that using a GSM modem is more reliable than a
phone. Some providers do not send DLRs to a phone.
>>>
>>> But what do you mean by http SMSc? A GSM modem is different than an HTTP
>>> smsc.
>>>
>>> BR,
>>> Nikos
>>> ----- Original Message ----- From: Gjergji Guri
>>> To: [email protected]
>>> Sent: Saturday, August 28, 2010 10:39 AM
>>> Subject: Getting DLR reports for AT SMSC
>>>
>>>
>>>
>>> Hi,
>>>
>>> I have no problem to get DLR report for http SMSC by setting the correct
>>> dlr-mask and dlr-url. Nevertheless, though my modem driver and network
support receiving delivery reports the bearerbox do not process any
delivery
>>> reports.
>>>
>>> At page 64 of the User Guide (Feature checklist) or Table 6-2. SMSC
driver
>>> features I can see that for AT driver the ?Can Use DLR? is set to N.
Nevertheless, N is set even for http request where the delivery is
working
>>> fine in my configuration.
>>>
>>> Do I need to setup some specific processing for the incoming SMS delivery
>>> reports retrieved by the AT modem?
>>>
>>> Has anyone configured delivery reports with Kannel using a modem (AT SMSC
>>> driver)?
>>>
>>> Any hint, guidance?
>>>
>>> Cheers,
>>> Gjergji
>>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>>
> <http://www.kannel.org/pipermail/users/attachments/20100828/41f0b3b8/attachm
ent-0001.html>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Sat, 28 Aug 2010 15:37:19 +0300
>> From: "Nikos Balkanas" <[email protected]>
>> To: "Gjergji Guri" <[email protected]>
>> Cc: [email protected]
>> Subject: Re: Getting DLR reports for AT SMSC
>> Message-ID: <e37c98ac3979428c9b51ad3a31ddc...@drwho>
>> Content-Type: text/plain; format=flowed; charset="windows-1253";
>>      reply-type=original
>>
>> Nothing different from your http smsc connection.
>>
>> Do you see any DLRs in access log from GSM modem?
>>
>> Please post your configuration and detailed bb logs of a deliver_sm pdu
from
>> your GSM modem, with context.
>>
>> BR,
>> Nikos
>> ----- Original Message -----
>> From: Gjergji Guri
>> To: Nikos Balkanas
>> Cc: [email protected]
>> Sent: Saturday, August 28, 2010 3:30 PM
>> Subject: Re: Getting DLR reports for AT SMSC
>>
>>
>> Many thanks Nikos and good to hear that it works.
>>
>>
>> I've configured DLR callback with Clickatell (system-type = clickatell)
having the smsc variable set to http. This is configured as a separate
SMSC
>> and I have no problem with processing DLR.
>>
>>
>> I've configure a HUAWEI E618 Mobile Connect - 3G Modem and can send SMS
messages using HTTP Push service.
>>
>>
>> In my current configuration I do not see the dlr-url to be called, when I
>> use the GSM modem, which works when message is routed via clickatell.
>>
>>
>> Do I need to make any specific configuration for the GSM modem smsc in
order
>> for the delivery status reports to be processed?
>>
>>
>>
>>
>> Kind Regards,
>> Gjergji
>>
>>
>>
>>
>>
>> 2010/8/28 Nikos Balkanas <[email protected]>
>>
>> Yes, and it works. Note that using a GSM modem is more reliable than a
phone. Some providers do not send DLRs to a phone.
>>
>> But what do you mean by http SMSc? A GSM modem is different than an
HTTP smsc.
>>
>> BR,
>> Nikos
>> ----- Original Message ----- From: Gjergji Guri
>> To: [email protected]
>> Sent: Saturday, August 28, 2010 10:39 AM
>> Subject: Getting DLR reports for AT SMSC
>>
>>
>>
>> Hi,
>>
>> I have no problem to get DLR report for http SMSC by setting the
correct dlr-mask and dlr-url. Nevertheless, though my modem driver and
network support receiving delivery reports the bearerbox do not process
any delivery
>> reports.
>>
>> At page 64 of the User Guide (Feature checklist) or Table 6-2. SMSC driver
>> features I can see that for AT driver the ?Can Use DLR? is set to N.
Nevertheless, N is set even for http request where the delivery is
working
>> fine in my configuration.
>>
>> Do I need to setup some specific processing for the incoming SMS delivery
>> reports retrieved by the AT modem?
>>
>> Has anyone configured delivery reports with Kannel using a modem (AT SMSC
>> driver)?
>>
>> Any hint, guidance?
>>
>> Cheers,
>> Gjergji
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Sat, 28 Aug 2010 08:41:08 -0500
>> From: Alvaro Cornejo <[email protected]>
>> To: Gjergji Guri <[email protected]>
>> Cc: [email protected]
>> Subject: Re: Getting DLR reports for AT SMSC
>> Message-ID:
>>      <[email protected]>
>> Content-Type: text/plain; charset=windows-1252
>>
>> Hi
>>
>> As noted by Nikos, many operators do not send any dlr back to phone
numbers, so it might be OK not to have any dlr from you operator.
>>
>> In this case, the "only"  dlr you will receive is the one generated by
kannel saying that it has sent the message to the smsc and it --the
smsc-- received the sms. YOu won?t receive any further info of its
status.
>>
>> Regards
>>
>> Alvaro
>>
>>
>>
> |---------------------------------------------------------------------------
--------------------------------------|
>> Env?e y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
>> en el Per?, M?xico y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
>> ? ? ? ? ? ? ? Visitenos en www.perusms.NET www.smsglobal.com.mx y
www.pravcom.com
>>
>>
>>
>> 2010/8/28 Nikos Balkanas <[email protected]>:
>>> Nothing different from your http smsc connection.
>>>
>>> Do you see any DLRs in access log from GSM modem?
>>>
>>> Please post your configuration and detailed bb logs of a deliver_sm
pdu from
>>> your GSM modem, with context.
>>>
>>> BR,
>>> Nikos
>>> ----- Original Message ----- From: Gjergji Guri
>>> To: Nikos Balkanas
>>> Cc: [email protected]
>>> Sent: Saturday, August 28, 2010 3:30 PM
>>> Subject: Re: Getting DLR reports for AT SMSC
>>>
>>>
>>> Many thanks Nikos and good to hear that it works.
>>>
>>>
>>> I've configured DLR callback with Clickatell (system-type =
clickatell) having the smsc variable set to http. This is configured
as a separate SMSC
>>> and I have no problem with processing DLR.
>>>
>>>
>>> I've configure a HUAWEI E618 Mobile Connect - 3G Modem and can send
SMS messages using HTTP Push service.
>>>
>>>
>>> In my current configuration I do not see the dlr-url to be called, when I
>>> use the GSM modem, which works when message is routed via clickatell.
>>>
>>>
>>> Do I need to make any specific configuration for the GSM modem smsc in
order
>>> for the delivery status reports to be processed?
>>>
>>>
>>>
>>>
>>> Kind Regards,
>>> Gjergji
>>>
>>>
>>>
>>>
>>>
>>> 2010/8/28 Nikos Balkanas <[email protected]>
>>>
>>> Yes, and it works. Note that using a GSM modem is more reliable than a
phone. Some providers do not send DLRs to a phone.
>>>
>>> But what do you mean by http SMSc? A GSM modem is different than an HTTP
>>> smsc.
>>>
>>> BR,
>>> Nikos
>>> ----- Original Message ----- From: Gjergji Guri
>>> To: [email protected]
>>> Sent: Saturday, August 28, 2010 10:39 AM
>>> Subject: Getting DLR reports for AT SMSC
>>>
>>>
>>>
>>> Hi,
>>>
>>> I have no problem to get DLR report for http SMSC by setting the correct
>>> dlr-mask and dlr-url. Nevertheless, though my modem driver and network
support receiving delivery reports the bearerbox do not process any
delivery
>>> reports.
>>>
>>> At page 64 of the User Guide (Feature checklist) or Table 6-2. SMSC
driver
>>> features I can see that for AT driver the ?Can Use DLR? is set to N.
Nevertheless, N is set even for http request where the delivery is
working
>>> fine in my configuration.
>>>
>>> Do I need to setup some specific processing for the incoming SMS delivery
>>> reports retrieved by the AT modem?
>>>
>>> Has anyone configured delivery reports with Kannel using a modem (AT SMSC
>>> driver)?
>>>
>>> Any hint, guidance?
>>>
>>> Cheers,
>>> Gjergji
>>>
>>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 6
>> Date: Sat, 28 Aug 2010 15:44:11 +0200
>> From: Gjergji Guri <[email protected]>
>> To: Alvaro Cornejo <[email protected]>
>> Cc: [email protected]
>> Subject: Re: Getting DLR reports for AT SMSC
>> Message-ID:
>>      <[email protected]>
>> Content-Type: text/plain; charset="windows-1252"
>>
>> That's correct Alvaro, but if I take the SIM card out of the modem and
insert it in my Nokia phone I get delivery status. I tested the same by
turning off and on the recipient phone, and the Vodafone network in
Albania
>> support the delivery status reports.
>>
>> Regards,
>> Gjergji
>>
>> On Sat, Aug 28, 2010 at 3:41 PM, Alvaro Cornejo
>> <[email protected]>wrote:
>>
>>> Hi
>>>
>>> As noted by Nikos, many operators do not send any dlr back to phone
numbers, so it might be OK not to have any dlr from you operator.
>>>
>>> In this case, the "only"  dlr you will receive is the one generated by
kannel saying that it has sent the message to the smsc and it --the
smsc-- received the sms. YOu won?t receive any further info of its
status.
>>>
>>> Regards
>>>
>>> Alvaro
>>>
>>>
>>>
>>>
> |---------------------------------------------------------------------------
--------------------------------------|
>>> Env?e y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
>>> en el Per?, M?xico y en mas de 180 paises. Use aplicaciones 2 vias via
SMS y GPRS online
>>>               Visitenos en www.perusms.NET www.smsglobal.com.mx y
>>> www.pravcom.com
>>>
>>>
>>>
>>> 2010/8/28 Nikos Balkanas <[email protected]>:
>>> > Nothing different from your http smsc connection.
>>> >
>>> > Do you see any DLRs in access log from GSM modem?
>>> >
>>> > Please post your configuration and detailed bb logs of a deliver_sm
>>> pdu
>>> from
>>> > your GSM modem, with context.
>>> >
>>> > BR,
>>> > Nikos
>>> > ----- Original Message ----- From: Gjergji Guri
>>> > To: Nikos Balkanas
>>> > Cc: [email protected]
>>> > Sent: Saturday, August 28, 2010 3:30 PM
>>> > Subject: Re: Getting DLR reports for AT SMSC
>>> >
>>> >
>>> > Many thanks Nikos and good to hear that it works.
>>> >
>>> >
>>> > I've configured DLR callback with Clickatell (system-type =
>>> clickatell)
>>> > having the smsc variable set to http. This is configured as a
>>> separate
>>> SMSC
>>> > and I have no problem with processing DLR.
>>> >
>>> >
>>> > I've configure a HUAWEI E618 Mobile Connect - 3G Modem and can send
>>> SMS
>>> > messages using HTTP Push service.
>>> >
>>> >
>>> > In my current configuration I do not see the dlr-url to be called,
>>> when I
>>> > use the GSM modem, which works when message is routed via clickatell.
>>> >
>>> >
>>> > Do I need to make any specific configuration for the GSM modem smsc
>>> in
>>> order
>>> > for the delivery status reports to be processed?
>>> >
>>> >
>>> >
>>> >
>>> > Kind Regards,
>>> > Gjergji
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > 2010/8/28 Nikos Balkanas <[email protected]>
>>> >
>>> > Yes, and it works. Note that using a GSM modem is more reliable than
>>> a
>>> > phone. Some providers do not send DLRs to a phone.
>>> >
>>> > But what do you mean by http SMSc? A GSM modem is different than an
>>> HTTP
>>> > smsc.
>>> >
>>> > BR,
>>> > Nikos
>>> > ----- Original Message ----- From: Gjergji Guri
>>> > To: [email protected]
>>> > Sent: Saturday, August 28, 2010 10:39 AM
>>> > Subject: Getting DLR reports for AT SMSC
>>> >
>>> >
>>> >
>>> > Hi,
>>> >
>>> > I have no problem to get DLR report for http SMSC by setting the
>>> correct
>>> > dlr-mask and dlr-url. Nevertheless, though my modem driver and
>>> network
>>> > support receiving delivery reports the bearerbox do not process any
>>> delivery
>>> > reports.
>>> >
>>> > At page 64 of the User Guide (Feature checklist) or Table 6-2. SMSC
>>> driver
>>> > features I can see that for AT driver the ?Can Use DLR? is set to N.
Nevertheless, N is set even for http request where the delivery is
>>> working
>>> > fine in my configuration.
>>> >
>>> > Do I need to setup some specific processing for the incoming SMS
>>> delivery
>>> > reports retrieved by the AT modem?
>>> >
>>> > Has anyone configured delivery reports with Kannel using a modem (AT
>>> SMSC
>>> > driver)?
>>> >
>>> > Any hint, guidance?
>>> >
>>> > Cheers,
>>> > Gjergji
>>> >
>>> >
>>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>>
> <http://www.kannel.org/pipermail/users/attachments/20100828/bb90235d/attachm
ent.html>
>>
>> ------------------------------
>>
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://www.kannel.org/mailman/listinfo/users
>>
>>
>> End of users Digest, Vol 48, Issue 177
>> **************************************
>>
>
>
>
>
>
>





Reply via email to