On 10/18/07, Andrew Stirling wrote: > Garry > > Could you supply a bit of code please? > I had a look at using Blat through Gmail but got well lost when trying > to figure out Stunnel. > Thanks > > Andrew Stirling > 01250 874580 > http://www.calcpay.co.uk > HMRC Accredited UK payroll program
Hi Andrew, No problem ... So, you've download Blat, and copied Blat.exe, Blat.dll & blat.lib to somewhere on your path - Blat suggests \windows\system32. Set Blat up with a suitable profile. Since we don't have a smtp server, you're going to redirect smtp traffic to the localhost - 127.0.0.1 - and with a suitable port. I've just picked 251. So, at the command prompt: blat -install 127.0.0.1 [EMAIL PROTECTED] -port 251 Blat will hopefully return something like: SMTP server set to 127.0.0.1 on port 251 with user [EMAIL PROTECTED], retry 1 time(s) Double check with: Blat -profile which should return: Profile(s) for all users of this computer -- SMTP: 127.0.0.1 "[EMAIL PROTECTED]" 1 251 Next, download Stunnel and install. It should give you an option to "Service Install". Don't click that yet though, we need to config STunnel.conf, which again, STunnel has an option: "Edit stunnel.conf". My stunnel.conf has the following set: cert = stunnel.pem socket = l:TCP_NODELAY=1 socket = r:TCP_NODELAY=1 CAfile = certs.pem debug = 7 output = stunnel.log client = yes Under the section, "; Service-level configuration" add the following line: protocol=smtp Under the section, "[ssmtp]" change it to read: accept = 127.0.0.1:251 connect = smtp.gmail.com:587 587 is one of the SSL ports that Gmail can use. See http://mail.google.com/support/bin/answer.py?answer=13287&topic=12567 for further details. Now install the Stunnel Service with "Service Install" and finally start the Stunnel Service with the "Service Start" option (or through the Control Panel->Admininstration Tools->Servic es). Stunnel should now appear in the System Tray. Now, fire off a test email with Blat. blat - -body " " -t [EMAIL PROTECTED] -f [EMAIL PROTECTED] -s "Testing" -u [EMAIL PROTECTED] -pw yourgmailpasswordgoeshere -debug With the -debug option, it should return something like this (NB: I've masked my machine name and IP with *): Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19) <<<getline<<< 220 mx.google.com ESMTP y2sm2415388mug >>>putline>>> EHLO ******-********.gmail.com <<<getline<<< 250-mx.google.com at your service, [**.**.***.**] <<<getline<<< 250-SIZE 28311552 <<<getline<<< 250-8BITMIME <<<getline<<< 250-AUTH LOGIN PLAIN <<<getline<<< 250 ENHANCEDSTATUSCODES Sending stdin.txt to [EMAIL PROTECTED] Subject: Testing Login name is [EMAIL PROTECTED] >>>putline>>> AUTH PLAIN AGdhcnJ5LmJldHRsZUBnbWFpbC5jb20AY3J1YzFhbA== <<<getline<<< 235 2.7.0 Accepted >>>putline>>> MAIL FROM:<[EMAIL PROTECTED]> <<<getline<<< 250 2.1.0 OK >>>putline>>> RCPT TO:<[EMAIL PROTECTED]> <<<getline<<< 250 2.1.5 OK >>>putline>>> DATA <<<getline<<< 354 Go ahead <<<getline<<< 250 2.0.0 OK 1192726085 y2sm2415388mug >>>putline>>> QUIT <<<getline<<< 221 2.0.0 mx.google.com closing connection y2sm2415388mug And in Gmail ... (NB: I've again masked my machine name and IP): Return-Path: <[EMAIL PROTECTED]> Received: from ******-********.gmail.com ( [**.**.***.**]) by mx.google.com with ESMTPS id y2sm2415388mug.2007.10.18.09.48.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Oct 2007 09:48:04 -0700 (PDT) Date: Thu, 18 Oct 2007 18:48:02 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] X-Mailer: Blat v2.6.2 w/GSS encryption, a Win32 SMTP/NNTP mailer http://www.blat.net Message-ID: <[EMAIL PROTECTED]> Subject: Testing Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset=ISO-8859-1 Hope this helps. I've got to go and man the BBQ... back after the break. Cheers, Garry _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

