Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

send mail from C program

1,221 views
Skip to first unread message

Akanksha

unread,
Jun 29, 2010, 2:07:12 PM6/29/10
to
Hi,

I have written a C program which will create a file, however I wanted to send that file thru mail to my mailbox. Please let me know how we can do it.

---
frmsrcurl: http://compgroups.net/comp.sys.tandem/

Keith Dick

unread,
Jun 29, 2010, 7:03:44 PM6/29/10
to

It would help a little to know whether you are asking about the Guardian environment or the OSS environment.

As far as I know, there is no simple email program available on NonStop any more. You do have a few options, though.

It is possible to use the TELNET program to connect to an SMTP mail server on port 23 and send the lines needed to make up the message. The SMTP protocol is a simple text protocol, so it is quite easy to send a simple message that way. It should be easy to find enough of a description of the SMTP protocol online to let you send simple messages that way. I've seen it described at some point in the past, but I don't remember where. It was pretty simple. Assuming the file you want to send contains just plain text, you would just put it in the body of the email. You probably could do an attachment via TELNET, too, but I think that would no longer qualify as a simple task.

There is a port of the mutt command line email client in the library of open source software ported to OSS (http://ituglib.connect-community.org/). If your site has OSS, you probably could install mutt and use it to send the email. If you need to use it from a TACL script, the OSH command should allow you to do that.

In previous questions about this a few years ago, some people have mentioned a sendmail program written by Lars Jansen, but it seems to have disappeared from the web since then. Maybe someone who has a local copy of it will see your question and arrange to send it to you.

dimandja

unread,
Jun 29, 2010, 7:26:50 PM6/29/10
to
> I have written a C program which will create a file, however I wanted to send that file thru mail to my mailbox. Please let me know how we can do it.

Your question is too general for any answer to be helpful, I'm
afraid. Which part of sending that file to your mailbox do you really
need help with?

For a general answer, and provided Java is not foreign to your system,
start here: http://www.roseindia.net/javamail/

Also, whatever your application language is, you can access Java
routines from any language on Tandem.

mustlearntandem

unread,
Jun 30, 2010, 8:43:23 AM6/30/10
to
On Jun 29, 7:03 pm, Keith Dick <KeithD...@earthlink.net> wrote:

> As far as I know, there is no simple email program available on NonStop any more.  You do have a few options, though.
>
> It is possible to use the TELNET program to connect to an SMTP mail server on port 23 and send the lines needed to make up the message.  The SMTP protocol is a simple text protocol, so it is quite easy to send a simple message that way.  It should be easy to find enough of a description of the SMTP protocol online to let you send simple messages that way.  I've seen it described at some point in the past, but I don't remember where.  It was pretty simple.  Assuming the file you want to send contains just plain text, you would just put it in the body of the email.  You probably could do an attachment via TELNET, too, but I think that would no longer qualify as a simple task.
>
> There is a port of the mutt command line email client in the library of open source software ported to OSS (http://ituglib.connect-community.org/).  If your site has OSS, you probably could install mutt and use it to send the email.  If you need to use it from a TACL script, the OSH command should allow you to do that.
>
> In previous questions about this a few years ago, some people have mentioned a sendmail program >written by Lars Jansen, but it seems to have disappeared from the web since then.  Maybe someone >who has a local copy of it will see your question and arrange to send it to you.


Wouldn't you connect to port 25 for mail? Port 23 is typically the
telserv port.

It is trivial to run sendmail and converse using the basic HELO, MAIL
FROM:, RCPT TO: and DATA commands. If you can locate the sendmail
port or use Ron Bowden's you should be all set. Alternatively you
could simply connect to a sendmail running on another box that permits
access.

Rich S

unread,
Jun 30, 2010, 9:32:20 AM6/30/10
to

> In previous questions about this a few years ago, some people have mentioned a sendmail program written by Lars Jansen, but it seems to have disappeared from the web since then.  Maybe someone who has a local copy of it will see your question and arrange to send it to you.

I have a copy of the sendmail source code. Send me an e-mail and I'll
attach it to the reply.

wbreidbach

unread,
Jun 30, 2010, 9:35:49 AM6/30/10
to
On 30 Jun., 14:43, mustlearntandem <mustlearntan...@netscape.net>
wrote:

I have a copy of the sourcecode of Lars Jansen's sendmail program
available. The version is v2.2 *** Modified by Jeff Artz - 02/16/2005.

Keith Dick

unread,
Jun 30, 2010, 10:19:20 AM6/30/10
to

Oops, you are right. It is port 25. I should have looked it up rather than relying on my memory. Thanks for the correction.

I see two other people have offered the source code for Lars Jansen's sendmail program. It probably would be easier for Akanksha to get that rather than trying to talk SMTP using telnet. If his site management is reluctant to use unsupported software and doesn't want to buy Bowden's product, then using the telnet approach is still a reasonable approach. As you say, it is not very difficult to send a simple message that way. The protocol is very easy, once you track down a description of it. He probably could figure out the protocol from looking at the source code for Jansen's program, if no other way (though I'm sure there are examples of smtp via telnet on the web).

NonStopForEver

unread,
Jun 30, 2010, 10:52:05 PM6/30/10
to

Here is a link for the basic SENDMAIL protocol:

http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

hope this helps,

rob

carlo....@gmail.com

unread,
Jan 30, 2017, 3:07:06 PM1/30/17
to
I too used this program a decade ago. I lost the source but now I see a need for it. If anyone has it, please forward me a copy. carlo....@gmail.com

Dave

unread,
Feb 1, 2017, 8:14:53 AM2/1/17
to
Check your spam folder. I sent it to you on Monday.

wbreidbach

unread,
Feb 1, 2017, 11:53:24 AM2/1/17
to
The newest version I have available is 2.6 dated May 2014.

Avi

unread,
Feb 21, 2017, 2:33:21 AM2/21/17
to
could you fwd me as well avika...@gmail.com

wbreidbach

unread,
Feb 22, 2017, 5:26:27 AM2/22/17
to
Mail has been sent. As far as I remember this version should be available from ITUGLIB.


0 new messages