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
Guest




PostPosted: Mon Jul 24, 2006 12:33 am   Post subject: (No subject)

Or is there a better language to do this in?
Sponsor
Sponsor
Sponsor
sponsor
Guest




PostPosted: Mon Jul 24, 2006 12:34 am   Post subject: (No subject)

BTW This is the only forum I know where you cannot edit your messages when you ask for help...
Mazer




PostPosted: Mon Jul 24, 2006 7:21 am   Post subject: (No subject)

vahnx wrote:
What the hell are you guys all talking about? Does this stuff have anything to do using Turing to send a simple message to an email?

Yes. Have you still not read the wikipedia article for SMTP? They even have a sample telnet session for connecting to a server and sending an email.

vahnx wrote:
Or is there a better language to do this in?

Well, it's Turing, so yes. But I wouldn't advise learning a new language learning a new language with the intention of making this program. Learn the language for the sake of learning the language; don't rush it.
Anyway, you've already got the built in net commands in Turing, so that's one good thing.

vahnx wrote:
BTW This is the only forum I know where you cannot edit your messages when you ask for help...

Yes. It's been discussed a few times in the past. One solution is to take the time to think about what you want to say in your post instead of firing off a sentence like it's an instant message. Also hitting preview. A few extra seconds before posting can sometimes be enough to remind you of some point you missed.
r.3volved




PostPosted: Mon Jul 24, 2006 10:21 am   Post subject: (No subject)

vahnx wrote:
What the hell are you guys all talking about? Does this stuff have anything to do using Turing to send a simple message to an email?


How are you supposed to automate an email client when you don't know how to send email manually??

I can't tell if you are new to programming, or if you just don't have a problem solver's mindset...but as I stated before, you need to research your problem before you can even begin to develop any sort of solution.

Programmers are problem solvers. Thats what we do...and in order to solve the problem, you first have to understand said problem. Real developers do not run by the seat of their pants.

Have you ever heard of systems analysis and design?
...How about R.A.D.I.T?
Research
Analyze
Design
Implement
Test
...How about the systems development lifecycle?
Do you know what a Usecase diagram is? Class diagrams? CRC Cards? Flowcharts? Statecharts? Sequence Diagrams?

There are certain steps you need to take in order to effectively solve a problem, whether it be a program or any other sort of problem.
Reals




PostPosted: Tue Jul 25, 2006 9:19 am   Post subject: (No subject)

I still dont understand why my e-mail is being sent in bare LF format, therefor it wont go tho, i think this problem is over my head a little because i have no idea how to fix it.
Any Hints?!?!?
[Gandalf]




PostPosted: Tue Jul 25, 2006 5:25 pm   Post subject: (No subject)

Hint:
[Gandalf] wrote:
Once you figure out what <cr><lf> means, it's as simple as adding two characters to your code.

Hint:
[Gandalf] wrote:
The solution is the same is most languages, it's not Turing specific.

Hint:
You'll want to look up escape characters, which are, might I add, not Turing specific.

Other than those three hints, I think I should point out that someone already gave you the answer. I'll leave it to you to figure it all out.
Guest




PostPosted: Thu Jul 27, 2006 8:25 pm   Post subject: (No subject)

Ok I think I got a response back from mail.google.com it gave me an IP or something? I dunno Im lost can you explain over again.
Cervantes




PostPosted: Thu Jul 27, 2006 9:20 pm   Post subject: (No subject)

vahnx wrote:
I dunno Im lost can you explain over again.


It's been explained as well as it's going to be explained.

Gosh, I almost started to give my pioneer speech, but then I realized I'd said it recently -- in this thread.

I'm going to lock this if this pattern of "do it for me" continues one more time. This is your warning.
Sponsor
Sponsor
Sponsor
sponsor
r.3volved




PostPosted: Thu Jul 27, 2006 11:29 pm   Post subject: (No subject)

Ok...let me spell this out for you step by step
(I will even use your own post so you understand)

For reference
---------------
C: == Client side comand (you type this...without the CSmile
:\> == cmd shell message
---------------

Open a cmd shell.
To do this, click 'start' >> 'run' >> type 'cmd' and press enter

Now hopefully you've followed me thus far...you should have cmd shell open.
code:
:\> telnet www.compsci.ca 25

This means: telnet to host 'www.compsci.ca' on port 25 (SMTP port)
You should be greeted with the following message:
code:
220 larchmont.dreamhost.com ESMTP

This is a successful connection greeting.
Now you must Identify yourself with the HELO command:
code:
C: HELO mydomain.com

A successful identification will result in a 250 return message...
...like the following:
code:
250 larchmont.dreamhost.com

Now you must identify the sender with the MAIL FROM: command:
code:

A successful response again is a 250
...like the following:
code:
250 Ok

Now you must identify the recipient with the RCPT TO: command:
code:
C: RCPT TO: friend@example.com

A successful respose again is a 250
...like the following: (NOTE compsci does not allow rela access)
code:
250 Ok

Now that you have your sender and your recipient identified, you can enter data with the DATA command:
code:
C: DATA

A successful response here will be indicated by a 354 response:
code:
354 Go ahead

Now enter your message and end it with a '.' on the final line by itself
code:
C: Subject: test message
C: From: sender@mydomain.com
C: To: friend@example.com
C:
C: Hello,
C: This is a test.
C: Goodbye.
C: .

A successful message will give you a 250 respose once again and probably give you a queue number of the message.
code:
250 Ok: queued as 12345

Now use the QUIT command to exit the telnet session and send the message
code:
C: QUIT

...and the server will say goodbye to you with a 221 code
code:
221 Bye

you should now be back at the cmd prompt
code:
:\>


Now you should at least understand the steps required to complete an email by hand through telnet...look it up at a couple more websites and find out how to add extra data (ex. SUBJECT)

Once again....'C:' means that it's a client command which you input to the console. If you make a typing mistake, just press enter, as a backspace character will fuck shit up and even though your input might look right, it will not be accepted. REMEMBER: any backspace (not delete...) will alter your screen, but it actually appends a backspace character to the command.

compsci.ca SMTP server will not allow sending of messages...so try a couple other hosts for a successful message.

if you still don't understand then you're in WAY over your head right now
Guest




PostPosted: Thu Jul 27, 2006 11:45 pm   Post subject: (No subject)

Cervantes, what do you mean by do it for me . Like I said, I don't know much about what all you guys are talking about. The above guide is talking about the Command Prompt, which has nothing to do with Turing that I know of. Is there a way I can use Turing to access the command prompt? Is that how I have to do it? This is a Turing help forum and I'm just asking for help, not for someone to do it for me! If I am doing this do I have to use Net.OpenConnection or what kinda commands will I have to use?

I reviewed some previous posts saying I have to get data from a stream I believe with "telenet,25", but I don't understand what that means fully. Like 25 is the email port, like 5055 is for MSN or something, and 80 is the inernet. I understand that part. BTW this isn't for a school project, I wish to see if I am able to send a message to my gmail account using Turing. Like
"Subject: Hello" then the message, like a normal email. Or sending one of my jpegs or what my title says, a ".txt" file so I can download it as an attachment from my GMail account.

Before school ended, I asked my teacher and he had no clue. But I think it is possible to do what I'm asking. I am new to Turing and have a small ammount of experience with Net. I've been trying for over a month I believe now, but I will keep trying this telenet thing.
Guest




PostPosted: Thu Jul 27, 2006 11:53 pm   Post subject: (No subject)

r.3volved, I now understand it more. But I am not getting a response from www.compsci.ca when I :\> telnet www.compsci.ca 25. And I know how to access the command prompt, I sometimes run Netstat commands just to see what's going on.
Guest




PostPosted: Thu Jul 27, 2006 11:57 pm   Post subject: (No subject)

Ok now it just worked, maybe I was typing it in wrong. Ok Ill continue reading more.. Wait, I exited and tried again. Sometimes do you have to type in the telnet multiple times for it to work?
Guest




PostPosted: Fri Jul 28, 2006 12:02 am   Post subject: (No subject)

Grr I had it but then I closed it and it wont go back
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Guest




PostPosted: Fri Jul 28, 2006 12:13 am   Post subject: (No subject)

Aha I got connected again easier by first typing telenet, then typing o www.compsci.ca 25. So after telenet you must press enter.
[Gandalf]




PostPosted: Fri Jul 28, 2006 2:11 am   Post subject: (No subject)

/me sighs and tries his best not to explode.

vahnx, thanks for that quintuple post, it does us all a lot of good. Keep it up.

Now, I will point out that it is possible. How many times does something have to be confirmed before you believe it? I've personally done it. Yes, in Turing. Guess what? I had only used the Net module once before then, to implement the IRC protocol. When I was doing that, I simply read through the IRC specifications, skimmed through each of the Net functions, and was well on my way. Sure, you will experience problems, but you must learn to solve them! You've already recieved tons of help, so it should be easier for you.

What r.3volved posted is exactly what you should be sending, using the Net module, through Turing. Nothing to do with the command prompt. Only difference between what you'll be doing in Turing and what you do in the command prompt is that you'll be opening the connection using Net.OpenConnection() not through telnet.

If this is all just that far beyond you, learn something else before doing this. After all, learning teaches you to learn better afterwards.
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 4 of 5  [ 64 Posts ]
Goto page Previous  1, 2, 3, 4, 5  Next
Jump to:   


Style:  
Search: