Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

command line e-mail retrieval with SSL support?


  • Please log in to reply
20 replies to this topic
aMailuhr
  • Guests
  • Last active:
  • Joined: --
Hi all,

I'm trying to build an email client in ahk. I use blat/getmail for this, however getmail does not support SSL (so no GMail access for example).

Does anyone know of a free/small utility that can?

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Outlook ?

Belial
  • Members
  • 40 posts
  • Last active: Jan 19 2007 03:21 AM
  • Joined: 26 Jun 2005
I think aMailuhr's ideia was a small program to run background with all the email abilities, so the AHK Script could do the rest [GUI, Buttons, a contact with the user basically] ...

It is [of course] true that Outlook can send mails, but it isn't Freeware, it is big and it haves alot of things that are useless for this situation!

[I am being looking for this for a long time too, I wanted something like the "virus email engine", don't interpret me wrong, I just think it is amazing how small the engine is and how perfect it does it's work]
Belial

aMailuhr
  • Guests
  • Last active:
  • Joined: --
Hmm, after a bit of searching I found stunnel, which can provide the SSL I was looking for.

To be able to use it, you'll need the stunnel.exe (very small), and the OpenSSL libraries (libssl32.dll and libeay32.dll), all in all a 2 MB package :( , but apparently the only way to do this...

You'll need to install the stunnel.exe (as a service) first, you can do this by invoking it with the -install suffix (command line). Now it's installed, but not running (yet)

Gmail example:

create a stunnel.conf file, and fill in the following info:

# GLOBAL OPTIONS

client = yes
output = stunnel-log.txt
debug = 0
taskbar = no

# SERVICE-LEVEL OPTIONS 

[SMTP Gmail]
accept = 127.0.0.1:1099
connect = smtp.gmail.com:465

[POP3 Gmail]
accept = 127.0.0.1:1109
connect = pop.gmail.com:995

Run the following:

Run, net start stunnel

This will start the stunnel service. Now that it is running, we can use it:

Now the following should work with getmail (receiving e-mails):

run, getmail -u yourusername -pw yourpassword -s 127.0.0.1 -port 1109

And the following with blat (sending e-mails):

Run, Blat -install smtp.gmail.com [email protected]

Run, Blat - -body "this is a test e-mail" -subject "a test" -to [email protected] -u yourusername -pw yourpassword -f yourusername -debug -server 127.0.0.1:1099

8)

:!: You need to change your settings in Gmail for this to work:

"Forwarding and POPAccount" section:
1. Enable POP for all mail (even mail that's already been downloaded)
2. When messages are accessed with POP: keep Gmail's copy in the Inbox.

After you downloaded your e-mails with this setup, Gmails settings will have changed (the downloaded e-mails will be flagged for no redownloading). In order to get the same messages again, you'll need to reenter the mentioned settings...

You can adapt stunnels config file to use different setups... stop it first by using net stop stunnel, change the config file and start the service again with net start stunnel...

Useable: gmail.com (1GB POP/SMTP), spymac.com (1GB POP/IMAP/SMTP), bgxmail.net (10GB POP/IMAP), icmail.net (1GB POP/IMAP/SMTP)

Not-useable: hotmail.com/msn.com, yahoo.com (you need to pay for POP/IMAP/SMTP at these free e-mail providers now)

aMailuhr
  • Guests
  • Last active:
  • Joined: --
You can use the following to get info on any new e-mails from Gmail thru their RSS feed:

urldownloadtofile, https://yourusername:[email protected]/mail/feed/atom, mails.txt

Am still looking for a way to get POP access to hotmail/msn/yahoo...

There are a couple of free utils for this available, but 'all' they do is simulate a web-login, extract the mails, convert them to a POP 'compatible' format...

aMailuhr
  • Guests
  • Last active:
  • Joined: --
PS: you don't need to run stunnel as a service if that is undesireable, you can simply start it, then close/kill it if you are done

MisterW
  • Members
  • 65 posts
  • Last active: Jun 18 2007 11:14 AM
  • Joined: 20 Jul 2005

Am still looking for a way to get POP access to hotmail/msn/yahoo...


Have you tried Hotmail Popper

It's free for me (I must be a valued hotmail user) :)

BoBo
  • Guests
  • Last active:
  • Joined: --
Currently supported webmail providers:

Hotmail
mail.com
Yahoo
gmail (Google mail)
indiatimes.com
juno
rediffmail
Gossamer mail
Outlook Web Access (Exchange 5.5)
Outlook Web Access 2003

[More...][More...][/url]

  • Guests
  • Last active:
  • Joined: --
Thanks much, appreciated! aMailuhr!

toralf as guest
  • Guests
  • Last active:
  • Joined: --

Useable: gmail.com (1GB POP/SMTP), spymac.com (1GB POP/IMAP/SMTP), bgxmail.net (10GB POP/IMAP), icmail.net (1GB POP/IMAP/SMTP)

Not-useable: hotmail.com/msn.com, yahoo.com (you need to pay for POP/IMAP/SMTP at these free e-mail providers now)

you need to pay for POP3/SMTP at bgxmail.net as well
And as you said before gmail.com only accepty SSL connections to POP3 and SSL.
Currently I can't get a connection to icmail.net

I just test gawab.com.

acowbear
  • Members
  • 45 posts
  • Last active: Nov 09 2008 11:04 PM
  • Joined: 14 May 2006
Sweet. I now have stunnel so blat and getmail are working with my gmail account....BUT, for some reason IF I send mail to myself with blat, then getmail fails to retreive it. It says "There are 0 messages on the server."

I know blat sent it because I can see the message I just sent myself in my inbox when I sign in through the gmail website, but getmail does not recognize it or something...

Anyone know how to fix this or what the problem is??

avitar
  • Guests
  • Last active:
  • Joined: --
I'm using stunnel 4.25. I can access my gmail inbox, but althought there are 100 or so emails theregetmsil can olny see about 250 of them.

Anyone any ideas?

Avi

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007

Outlook ?

even IE
Fire Fox
those are free
opera
i could go on
Never lose.
WIN or LEARN.

avitar
  • Guests
  • Last active:
  • Joined: --
My previous mail was badly typed & difficult to understand - sorry!

I'm running xp. I'd installed stunnel 4.25 and had set the stunnel conf file as recommended in an earlier email here. I can then run stunnel & can.

After I did this I was able to use getmail to access gmail (I use getmail quite a bit to access other email accounts without problems). The getmail parameters are also set up as in the earlier emails to access my gmail account, but for some strange reason getmail was reporting only 250 emails in my gmail inbox and I cannot get the very latest emails that I've sent to gmail. I have 1000 or so in my gmail account so I can't get to all of these with getmail.

So my Qs are:

I assume it's the stunnel setup that is causing the problem.
Is the stunnel .conf setup ok for stunnel 4.25 or is something else needed? Eg timeouts?

Anyone any ideas what else I can try? What about stunnel debug? Will that help/

Especially for the original emailer who suggested how to use stunnel & get getmail working. Any problems?

Regards Avi

avitar
  • Guests
  • Last active:
  • Joined: --
I've posted some emails here saying that getmail doesn't get my most recent emails & thinking it was a stunnel problem - well it wasn't!

Solution is to use recent mode- what's that you say? See gmail help about not downloading all emails.

Use the stunnel conf settings already described here. Then, to get recent mode, put recent: in front of the user name in the getmail line....

eg getmail ....-u recent:[email protected] ...

Amazingly this isn't an April 1st joke- it works!

Avi