Gmail has an SMTP server at smtp.gmail.com, which is available to all Gmail users who have enabled POP in their settings panel.

Unfortunately—or fortunately, depending on how you look at it—this server is not like many others; it requires that all clients log on using SSL. At this time, you can't create SSL sockets with mIRC, so the only way to connect to that server is through an SSL wrapper like Stunnel.

Here is an example config file for Stunnel (stunnel.conf) that forwards localhost:25 to smtp.gmail.com:465. Once you load Stunnel with this config file, direct your script to connect to localhost:25 as its SMTP server.

  • client=yes
    [gmail smtp]
    accept=25
    connect=smtp.gmail.com:465