Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How Do I Email .txt Files?
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2, 3, 4, 5  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Cervantes




PostPosted: Sun Jun 04, 2006 8:24 am   Post subject: (No subject)

vahnx wrote:

code:

var stream := Net.OpenConnection ("www.gmail.com", 25)
put : stream, "Hello www.gmail.com"



Notice in the quote you posted it used "HELO" not "Hello".
Also, you didn't get the first (220) line from the server.

I don't know if you'll need Net.TokenAvailable. Keep trying.
Sponsor
Sponsor
Sponsor
sponsor
Guest




PostPosted: Sun Jun 04, 2006 11:18 am   Post subject: (No subject)

Oh sorry. It was confusing cause it kept saying Hello, I didn't notice one 'L' was missing. And you said I need to get a line? Would that be like this?

code:

var line : message
var stream := Net.OpenConnection ("www.gmail.com", 25)
put : stream, "Hello www.gmail.com"
get : netstream, line
Guest




PostPosted: Sun Jun 04, 2006 11:19 am   Post subject: (No subject)

Instead of 'var line : message', I ment to put 'var line : string'.
Cervantes




PostPosted: Sun Jun 04, 2006 11:36 am   Post subject: (No subject)

vahnx wrote:
Oh sorry. It was confusing cause it kept saying Hello, I didn't notice one 'L' was missing. And you said I need to get a line? Would that be like this?

code:

var line : message
var stream := Net.OpenConnection ("www.gmail.com", 25)
put : stream, "Hello www.gmail.com"
get : netstream, line


Not quite. You open the connection, then the server sends a line, then you send the "HELO" line. So the get line would have to go before the put line.
Guest




PostPosted: Sun Jun 04, 2006 12:20 pm   Post subject: (No subject)

Ok, so far it seems cool.
code:

var line, URL : string
colour (13)
put "Enter a website: " ..
colour (green)
get URL
colour (black)
put "Connecting to " ..
colour (42)
put URL
var stream := Net.OpenConnection (URL, 25)
if stream = -10 then
    colour (brightred)
    put "Connection Failed!"
    return
end if
get : stream, line
colour (104)
put "Found line " ..
colour (150)
put line

When I try to connect to "www.gmail.ca", it returns "Connection Failed". But if I type "www.goolge.ca", it returns 220. If you test this and enter www.putfile.com, it gives "220-mainconnect2.putfile.com" for some reason.
Guest




PostPosted: Sun Jun 04, 2006 12:43 pm   Post subject: (No subject)

If I add
code:
put : stream, "HELO"
would the site see it?
Cervantes




PostPosted: Sun Jun 04, 2006 1:20 pm   Post subject: (No subject)

It should.
Why don't you try it? See what the server returns.
[Gandalf]




PostPosted: Sun Jun 04, 2006 4:49 pm   Post subject: (No subject)

vahnx, I've already told you... You're not going to be connecting directly to gmail.com to send a email to an @gmail.com e-mail address. You're going to be connecting to their smtp server, which you can find on that wikipedia article.

Other than that you just need to imitate the client portion of that dialogue, and recieve the server output.
Sponsor
Sponsor
Sponsor
sponsor
Guest




PostPosted: Sun Jun 04, 2006 5:41 pm   Post subject: (No subject)

It doesnt give me Gmail's SMPT server in your article.
Guest




PostPosted: Sun Jun 04, 2006 5:50 pm   Post subject: (No subject)

Here is my code so far:
code:

var line, URL : string
colour (13)
put "Enter a website: " ..
colour (green)
get URL %enter the url to connect to
colour (black)
put "Connecting to " ..
colour (42)
put URL
var stream := Net.OpenConnection (URL, 25) %begins to connect on port 25
if stream = -10 then %checks if connection failed
    colour (brightred)
    put "Connection Failed!"
    return
end if
get : stream, line %gets first line from the net stream
colour (104)
put "Found line " ..
colour (150)
put line

% for i : 1 .. 4500
%     exit when hasch
%     locate (4, 1)
%     put : stream, "Hello ", URL %speaks with the URL
%     put "Spamming ", URL, " #", i, " (Press Any Key To Stop)"
% end for

loop
    get : stream, line : *
    locate (5, 1)
    colour (blue)
    put line
end loop
Guest




PostPosted: Sun Jun 04, 2006 5:53 pm   Post subject: (No subject)

Now with that code, my result for example 'www.putfile.com', is:

Found line 220-mainconnect2.putfile.com
220 and/or bulk e-mail.
unknowngiver




PostPosted: Tue Jun 20, 2006 7:29 pm   Post subject: (No subject)

hey vahnx did u finally get it? i was following this thread cuz i wanted to learn how to do it too...
[Gandalf]




PostPosted: Wed Jun 21, 2006 7:49 am   Post subject: (No subject)

To learn just follow the instructions in this thread. It's much more beneficial than copying the source code from him (if he's gotten it..).
Guest




PostPosted: Wed Jun 21, 2006 4:58 pm   Post subject: (No subject)

So far no one has helped me at all. I read the article and it makes no sense. I am partially computer illerterate. So that SMPT thing makes NO SENSE to me at all. I don't think you can send emails through Turing, if so, why doesn't anyone post some code up that does it. Trust me, I will not learn by people giving me small hints such as reading up on SMPT, cause I have no clue what the article is talking about.
Guest




PostPosted: Sun Jul 16, 2006 8:57 pm   Post subject: (No subject)

Ok so far I got SMTP means Simple Mail Transfer Protocol. So if I use Net.OpenURLConnection with Gmail, how am I able to tell it that I wish to send data to my email address.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 5  [ 64 Posts ]
Goto page Previous  1, 2, 3, 4, 5  Next
Jump to:   


Style:  
Search: