Has anyone tried using the new SSL sockets in mIRC 6.17? I just tried converting one of my working non-ssl socket scripts to an ssl version. This particular script retrieves emails using POP3. I set it up to connect to the Gmail POP3 server. The script works perfectly the first time I run it. The emails are retrieved and deleted from the server like they did in the non-ssl version. However, if I try to run the script again, mIRC locks up and I get the typical "mIRC has encountered a problem and needs to close" message from windows. Here is the code I'm using in case anyone else wants to confirm this (see warning below):

Code:
alias dogetmail getmail -e pop.gmail.com 995 [color:green]username password[/color]

alias getmail {
  if (-* iswm $1) {
    var %switches = $1
    tokenize 32 $2-
  }

  ;--------
  set %chkADDR $1
  set %chkPORT $2
  set %chkUSER $3
  set %chkPASS $4
  ;--------

  set %getmail.write 0
  set %getmail.state 1
  if ($sock(getmail)) sockclose getmail
  sockopen $iif(e isin %switches,-e) getmail %chkADDR %chkPORT
  .timer 1 5 sockclose getmail
}

on *:SOCKREAD:getmail:{
  var %s
  sockread %s
  tokenize 32 %s
  echo -a > $1-

  if (-ERR isin $1) {
    echo 4 -a ERROR: $1-
    echo 4 -a %getmail.state QUIT
    sockwrite -n $sockname QUIT
    ; set %getmail.state -1
  }
  elseif (%getmail.state < 0) {
    echo 4 -a %getmail.state Done
    sockclose $sockname
  }
  elseif ((OK isin $1) && (!%getmail.write)) {
    if (%getmail.state == 1) {
      echo 3 -a USER
      sockwrite -n $sockname USER %chkUSER
      inc %getmail.state
    }
    elseif (%getmail.state == 2) {
      echo 3 -a PASS
      sockwrite -n $sockname PASS %chkPASS
      inc %getmail.state
    }
    elseif (%getmail.state == 3) {
      echo 3 -a STAT
      sockwrite -n $sockname STAT
      inc %getmail.state
    }
    elseif (%getmail.state == 4) {
      echo 12 -a $2 $iif($2 == 1,message,messages)
      if ($2 > 0) {
        set %getmail.count 1
        set %getmail.state 5
        set %getmail.num $2
        .remove mailget.tmp
        echo 3 -a RETR %getmail.count
        sockwrite -n $sockname RETR %getmail.count
      }
      else {
        echo 3 -a QUIT
        sockwrite -n $sockname QUIT
        set %getmail.state 99
      }
    }
    elseif (%getmail.state == 5) {
      echo 7 -a Receiving %getmail.count
      set %getmail.write 1
    }
    elseif (%getmail.state == 6) {
      if (%getmail.dele < %getmail.num) {
        inc %getmail.dele
        echo 3 -a DELE %getmail.dele
        sockwrite -n $sockname DELE %getmail.dele
      }
      else {
        echo 3 -a QUIT
        sockwrite -n $sockname QUIT
        set %getmail.state 99
      }
    }
    elseif (%getmail.state == 99) {
      echo 3 -a DONE
      sockclose $sockname
      unset %getmail.*
    }
  }
  elseif (%getmail.state == 5) {
    if ($1- == .) {
      var %getmail.ticks = $ticks
      .rename mailget.tmp $+(%getmail.ticks,.txt)
      echo 7 -a Received %getmail.count
      echo 7 -a Saved as $+(%getmail.ticks,.txt)
      set %getmail.write 0
      if (%getmail.count < %getmail.num) {
        inc %getmail.count
        echo 3 -a RETR %getmail.count
        sockwrite -n $sockname RETR %getmail.count
      }
      else {
        set %getmail.dele 1
        echo 3 -a DELE 1
        sockwrite -n $sockname DELE 1
        set %getmail.state 6
      }
    }
    else {
      write mailget.tmp $iif($1,$1-,$crlf)
    }
  }
}


Just change the username and password to those for a gmail account.

THIS CODE WILL DELETE ALL THE MESSAGES FROM THE ACCOUNT AFTER THEY HAVE BEEN RETRIEVED. USE AT YOUR OWN RISK.

-genius_at_work