CodeSegment CodeSegment
Software Technologies


Using stunnel with SMS Studio

1. Visit stunnel downloads page, download stunnel-x.xx-installer.exe, and install it on your computer with default settings. Note that the following instructions have been tested with stunnel version 5.26.


2. Once stunnel has started, right-click its icon in the taskbar notification area and select Edit Configuration option. The stunnel.conf file will be opened in text editor.


3. Scroll down to find "Service definitions" sections. By default, there should be three sections already enabled, namely [gmail-pop3], [gmail-imap] and [gmail-smtp]. Disable all enabled sections by commenting them with one semi-colon character at the start of each line, like this:


  ;client = yes
  ;accept =
  ;connect =
  ;verify = 2
  ;CAfile = ca-certs.pem
  ;checkHost =
  ;OCSPaia = yes


4. For, add a new section named [gmail-pop3-smsstudio] as follows:

  client = yes
  accept =
  connect =
  verify = 2
  CAfile = ca-certs.pem
  checkHost =
  OCSPaia = yes


5. Save and close the stunnel configuration file. Right-click stunnel icon in the taskbar notification area and select Reload Configuration option.


6. In SMS Studio create a new Email connection, and set the following parameters for

  Receive tab (emails will be received through stunnel service)
    POP3 server:
    Port: 20995
    User name: your_gmail_user_name
    Password: your_gmail_passwrod

  Send tab (emails will be sent directly to gmail server)
    SMTP server:
    Port: 465
    Server requires SSL: checked
    Server requires authentication: checked
    User name: your_gmail_user_name
    Password: your_gmail_password
    Sender email: your_gmail_email_address

7. Login to, go to My Account - Device activity & notifications and set "Allow less secure apps" to ON.


8. Your Email connection is now ready to be used. The same procedure described above can be used for any other email server that requires SSL for POP3, by simply adding a new section in the stunnel configuration file, for example:


  client = yes
  accept =
21995 <-- here select different port for each POP3 server
  connect = <-- here put the actual pop3 server and port
  verify = 2
  CAfile = ca-certs.pem
  checkHost = <-- here repeat the pop3 server
  OCSPaia = yes


9. For enabling SSL on incoming part of the HTTP connection in SMS Studio, add a new section named [https-smsstudio] as follows:


  accept = 443
<-- standard HTTPS port to which remote clients will connect, but you can chose another one
  connect = 22080 <-- the Listen port from the Incoming tab of the HTTP Connection dialog in SMS Studio
  cert = stunnel.pem <-- the default stunnel certificate, but you can use your own instead
  TIMEOUTclose = 0

Last update: December 6, 2023