1. Blat help - again

I am trying to get Blat.ew to work, with no joy at all. I see some of you guys have it working, so maybe you can tell me why this code fails:

atom err 
puts(1, "sending...please wait\n") 
 
--set up the registry entries so the send commands will work 
 
err = sendBlat("-install smtp.googlemail.com AndyFDrummond@googlemail.com") 
puts(1, getBlaterror(err)) 
puts(1,"\n") 
 
--send a simple message to me with subject Hello 
 
err = sendmail("Andy@kestreltele.com", "Hello") 
puts(1, getBlaterror(err)) 
puts(1,"\n") 
 

The first call returns 0, success, the second returns 2, Message body or attachment does not exist. The command file, \eublatbody, simply contains the original "-".

The code in eublat.ew doesn't seem to do what is required, but I just don't have the time or, now, the patience, to work through it. I assume it works, and that I have done something silly. The "sample usage" from the eublat readme is what I started with, and that does just what I said above.

Any ideas, gentlemen, or should I simply go and become a gardener??

new topic     » topic index » view message » categorize

2. Re: Blat help - again

A quick Google of "blat smtp gmail" seems to indicate that Blat does not support TLS, which GMail requires. People have gotten around this by using a program called Stunnel to create the TLS connection for Blat.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Blat help - again

ghaberek said...

A quick Google of "blat smtp gmail" seems to indicate that Blat does not support TLS, which GMail requires. People have gotten around this by using a program called Stunnel to create the TLS connection for Blat.

-Greg

Thanks Greg, that may be it. It would be far simpler, from what I can see of Stunnel, to find a basic free smtp server which does not need TLS. I don't suppose you know of one? I'm not sure how I can find out that.... Security is not important, really, I can set my client to reject anything not originating from my program. I'm just trying to get my configuration program to email me when a file is saved. There will only be a very few of these things in use, so not a lot of traffic.

I'm currently using an FTP link to my server, which works fine, but not on all computers. Some just cannot see the ftp - I open a CMD window and try ftp a.b.c.d and it just sees nothing, even though the ping works. Other machines A-OK. So I thought if I could send an email that could be simpler. Ha! Maybe not!

Andy

new topic     » goto parent     » topic index » view message » categorize

4. Re: Blat help - again

AndyDrummond said...

Thanks Greg, that may be it. It would be far simpler, from what I can see of Stunnel, to find a basic free smtp server which does not need TLS. I don't suppose you know of one? I'm not sure how I can find out that....

These are getting hard to find. I am not sure if hotpop.com still offers one. FastMail.FM used to as well. (obviously, you need to sign up an free email account with these providers before you can get access to their smtp servers. Open relays are BAD.)

AndyDrummond said...

I'm currently using an FTP link to my server, which works fine, but not on all computers. Some just cannot see the ftp - I open a CMD window and try ftp a.b.c.d and it just sees nothing, even though the ping works. Other machines A-OK. So I thought if I could send an email that could be simpler. Ha! Maybe not!

Sounds like a firewall is blocking the FTP port, if you can not even connect to it from some machines. (This is different from FTP connecting but then being unable to do a dir or transfer files - you can usually solve that by entering passive FTP mdoe.)

If you have control of the FTP server, see if it works if you run it on a different port (i.e. port 80 or port 443 instead of port 21).

new topic     » goto parent     » topic index » view message » categorize

5. Re: Blat help - again

jimcbrown said...
AndyDrummond said...

Thanks Greg, that may be it. It would be far simpler, from what I can see of Stunnel, to find a basic free smtp server which does not need TLS. I don't suppose you know of one? I'm not sure how I can find out that....

These are getting hard to find. I am not sure if hotpop.com still offers one. FastMail.FM used to as well. (obviously, you need to sign up an free email account with these providers before you can get access to their smtp servers. Open relays are BAD.)

I'll look into that. I have also been told these open relays are dodgy..

jimcbrown said...
AndyDrummond said...

I'm currently using an FTP link to my server, which works fine, but not on all computers. Some just cannot see the ftp - I open a CMD window and try ftp a.b.c.d and it just sees nothing, even though the ping works. Other machines A-OK. So I thought if I could send an email that could be simpler. Ha! Maybe not!

Sounds like a firewall is blocking the FTP port, if you can not even connect to it from some machines. (This is different from FTP connecting but then being unable to do a dir or transfer files - you can usually solve that by entering passive FTP mdoe.)

If you have control of the FTP server, see if it works if you run it on a different port (i.e. port 80 or port 443 instead of port 21).

Yep! My two laptops both have Kaspersky Internet Security - mine is 2009, and allows me to ftp out OK, the other is 2008 and I can find no way to allow it apart from from pausing protection. So - problem solved! I should have remembered - any internet/network problem, blame the firewall system in the internet protection program. Ah well. Back to looking at emails because it will still be useful.

What is Passive mode? I have seen it but it doesn't sound like I could write a file back to the server, which I want to do. Sounds a bit, well, passive...

Thanks for your help..

Andy

new topic     » goto parent     » topic index » view message » categorize

6. Re: Blat help - again

AndyDrummond said...

What is Passive mode? I have seen it but it doesn't sound like I could write a file back to the server, which I want to do. Sounds a bit, well, passive...

Active FTP vs. Passive FTP

-Greg

new topic     » goto parent     » topic index » view message » categorize

7. Re: Blat help - again

AndyDrummond said...
jimcbrown said...
AndyDrummond said...

Thanks Greg, that may be it. It would be far simpler, from what I can see of Stunnel, to find a basic free smtp server which does not need TLS. I don't suppose you know of one? I'm not sure how I can find out that....

These are getting hard to find. I am not sure if hotpop.com still offers one. FastMail.FM used to as well. (obviously, you need to sign up an free email account with these providers before you can get access to their smtp servers. Open relays are BAD.)

I'll look into that. I have also been told these open relays are dodgy..

hotpop.com and fastmail.fm are not open relays. I've used both and had great service from them. An open smtp relay (one that allows anyone and his pet dog to connect, with no authentication in place) tends to be taken over by spammers and then get shut down pretty quickly.

AndyDrummond said...
jimcbrown said...
AndyDrummond said...

I'm currently using an FTP link to my server, which works fine, but not on all computers. Some just cannot see the ftp - I open a CMD window and try ftp a.b.c.d and it just sees nothing, even though the ping works. Other machines A-OK. So I thought if I could send an email that could be simpler. Ha! Maybe not!

Sounds like a firewall is blocking the FTP port, if you can not even connect to it from some machines. (This is different from FTP connecting but then being unable to do a dir or transfer files - you can usually solve that by entering passive FTP mdoe.)

If you have control of the FTP server, see if it works if you run it on a different port (i.e. port 80 or port 443 instead of port 21).

Yep! My two laptops both have Kaspersky Internet Security - mine is 2009, and allows me to ftp out OK, the other is 2008 and I can find no way to allow it apart from from pausing protection. So - problem solved! I should have remembered - any internet/network problem, blame the firewall system in the internet protection program. Ah well. Back to looking at emails because it will still be useful.

Hmm. Will 2008 work with FTP in passive mode? I'd guess so, but I am not 100% certain.

AndyDrummond said...

What is Passive mode? I have seen it but it doesn't sound like I could write a file back to the server, which I want to do. Sounds a bit, well, passive...

You can upload files to the FTP server in passive mode. Passive mode has no loss of functionality as compared to Active mode. FTP's passive mode will do what you want.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Blat help - again

Check out the GNU TLS Library. You may have to craft your SMTP commands by hand, but the hard part (TLS) is done for you. I can work on wrapping it this week if I have some spare time.

-Greg

new topic     » goto parent     » topic index » view message » categorize

9. Re: Blat help - again

jimcbrown said...
AndyDrummond said...

What is Passive mode? I have seen it but it doesn't sound like I could write a file back to the server, which I want to do. Sounds a bit, well, passive...

You can upload files to the FTP server in passive mode. Passive mode has no loss of functionality as compared to Active mode. FTP's passive mode will do what you want.

Ah! The link above explained it all. I have now set passive mode and that should get around pretty much any firewall problems. It certainly works reading and writing from a local port, but I can't easily go out to try it on a public connection.

Thanks, Jim.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Blat help - again

ghaberek said...

Check out the GNU TLS Library. You may have to craft your SMTP commands by hand, but the hard part (TLS) is done for you. I can work on wrapping it this week if I have some spare time.

-Greg

Ummm. I don't really understand all that. I have to admit that though I am a programmer of umpteen years experience, I have used Euphoria and Win32Lib and Judith's IDE because I want to get functionality without knowing all the ins and outs of Windows & TCP/IP & TLS & YouKnowWhat. To me a PC is just a tool to help me with my real coding work which is for PIC16 and PIC18 type devices for equipment controllers. Entirely different field.

So - if you DO get a chance to get a wrapper going - no hurry, the FTP side is looking better each day - then I should be very glad to incorporate an email SMTP client in my program to send informative emails back to base. I assume it would use Blat, which is a complete free standing email client, even though I can't make it work at all; I get either error 1 or error 2 depending on the current phase of the moon and/or temperature outside! Something odd. But with a TLS add-on it should work with a server with TLS like our 1and1-hosted email server or with gmail which is more widely known and is definitely TLS'ed.

So - in summary - Greg, thank you, if you did that I would be very grateful. In your own time....

Andy

new topic     » goto parent     » topic index » view message » categorize

11. Re: Blat help - again

AndyDrummond said...
jimcbrown said...
AndyDrummond said...

What is Passive mode? I have seen it but it doesn't sound like I could write a file back to the server, which I want to do. Sounds a bit, well, passive...

You can upload files to the FTP server in passive mode. Passive mode has no loss of functionality as compared to Active mode. FTP's passive mode will do what you want.

Ah! The link above explained it all. I have now set passive mode and that should get around pretty much any firewall problems. It certainly works reading and writing from a local port, but I can't easily go out to try it on a public connection.

Thanks, Jim.

I confirm - with Passive mode selected (sounds like grammar!) it runs A-OK now, solid as any rock can be on the internet... Thanks VERY much indeed.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu