The TCPIPConnection Class and Email through JADE

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

The TCPIPConnection Class and Email through JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by JADE Kid - Ray Hidayat >> Fri, 21 Apr 2000 23:14:34 GMT

Hi everyone!

I have read all about the TCPIPConnection Class and as far as I know, to use it you would do something like this.

create tcp;
tcp.remoteName := "smtp.ihug.co.nz";
tcp.port := 25;
tcp.open;

After that you would probably typecast the message into binary format...

binMessage := message.Binary;


And then somehow you should transfer the email address. How do I do that?


--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The TCPIPConnection Class and Email through JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by krull >> Sat, 22 Apr 2000 0:22:52 GMT

Hi Ray,

Have a look in the jade_tech_design_architecture news-group and look for the thread "SMTP connectivity in JADE". The post from Geoff Davies shows how to use the TcpIpConnection class to connect to an SMTP server to send an email message. Some other alternatives using third-party programmes such as Blat or sendmail are also discussed. If you are interested and need to know more about SMTP (Simple Mail Transfer Protocol), have a look for RFC 821 on the net, here is one reference: http://freesoft.org/CIE/RFC/821/index.htm

RFC's or Requests For Comments, are the basis of the Internet's technical documentation.

Have Fun!

Krull

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The TCPIPConnection Class and Email through JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by Phil >> Sat, 22 Apr 2000 6:09:58 GMT

thats fine. But what if you need to log in to the server by transmitting a username and password. How do you get JADE to logon to the server?

Phil
--------------------------
"Is it some sort of killer Codemaster
Guardian destroying virus, that will keep
replicating and replicating until it takes
over Bob's entire body? Huh, Huh?
--------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Logging On

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by JADE Kid - Ray Hidayat >> Sat, 22 Apr 2000 6:41:50 GMT

That is a true statement. Sometimes you need to log on.
There is a authentication library reference property I think which does that.
I'm not sure how it works, but it exists.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Message not there

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by JADE Kid - Ray Hidayat >> Sat, 22 Apr 2000 6:43:20 GMT

As far as I can see, the message isn't there anymore.
If only I saw it.

I remember seeing it, but I didn't read it because it didn't interest me. Thanks anyway.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Message not there

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by Phil >> Sun, 23 Apr 2000 4:52:02 GMT

It is there. Your news reader may not be picking up old messages. Its from 1998 but here is the code. There is no logon so you'll need to find someone who will let you use their SMTP server for free (I may be doing that). Anyways here is the code. Courtest of Geoff Davies -

Test it in JADEScript

vars
tcp : TcpIpConnection;
smtp : String;
from : String;
too : String;
sub : String;
msg : String;begin

smtp := "143.96.31.69"; // replace with your own mail server
from := "<gdavies@jade.co.nz>"; // replace with your email address
too := "<person@somewhere.com>";
sub := "Hello World";
msg := "The traditional greeting.";

create tcp;
tcp.port := 25; // port for outgoing mail
tcp.name := smtp; // domain name or ip address of mail server
tcp.open;
tcp.writeBinary(("HELO " & app.computerName & CrLf).Binary);
tcp.writeBinary(("MAIL From: " & from & CrLf).Binary);
tcp.writeBinary(("RCPT To: " & too & CrLf).Binary);
tcp.writeBinary(("DATA" & CrLf).Binary);
tcp.writeBinary(("From: " & from & CrLf).Binary);
tcp.writeBinary(("To: " & too & CrLf).Binary);
tcp.writeBinary(("Subject: " & sub & CrLf).Binary);
tcp.writeBinary(CrLf.Binary);
tcp.writeBinary((msg & CrLf ).Binary);
tcp.writeBinary((CrLf & "." & CrLf).Binary);
tcp.writeBinary(("QUIT" & CrLf).Binary);
epilog
tcp.close;
delete tcp;
end;


--------------------------
"Is it some sort of killer Codemaster
Guardian destroying virus, that will keep
replicating and replicating until it takes
over Bob's entire body? Huh, Huh?
--------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Message not there

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by JADE Kid - Ray Hidayat >> Mon, 24 Apr 2000 0:44:00 GMT

Yeah, my news reader used to be filtered, but isn't anymore.
Now I would like to see older messages, and the filter was taken away, but still I can't see them.

Oh well, thank you.
That helps me a lot.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Message not there

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by Darrell Duniam >> Mon, 24 Apr 2000 3:12:49 GMT

Ray,

Try unsubscribing from the newsgroup, and then re-subscribe to it. You should then pick up all messages in the group.

darrell.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Message not there

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by JADE Kid - Ray Hidayat >> Mon, 24 Apr 2000 21:13:04 GMT

Great idea, I now have got the message!

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: The TCPIPConnection Class and Email through JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:52 am

by Robin Arzoni >> Wed, 26 Apr 2000 1:59:11 GMT

Ray,

If you have CardSchema, there is a CnSmtpConnection class that allows you to send email.
This class implements the SMTP protocol.

Regards,
Robin


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 21 guests

cron