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

Sending e-mails

25 views
Skip to first unread message

arbntl

unread,
Dec 14, 2002, 11:04:31 AM12/14/02
to
I'm working with a client whose running his system on D3 on an NT platform.
One of the areas that we're looking at is sending an e-mail to a user from
within D3. Basically, does anyone know if this can be done. If it can, could
you point me in the right direction.

Andrew Brzozowski

Daniel DRIES

unread,
Dec 14, 2002, 12:50:59 PM12/14/02
to
We have a product to send mail with D3 nt : d3mail, the price for this
product is 500 EUR.

Daniel

INFODATA Luxembourg - Europe

www.infodata.lu


"arbntl" <arb...@ntlworld.com> a écrit dans le message news:
kGIK9.839$9W5.1...@newsfep2-win.server.ntli.net...

Patrick Latimer

unread,
Dec 14, 2002, 2:48:22 PM12/14/02
to
Check out this link.

http://www.asent.com/support99frames.html

HTH, Patrick <;=)

L

unread,
Dec 14, 2002, 3:20:58 PM12/14/02
to
There is a working program in MVtools called MVSENDEM
(No attachments yet though)
The price for this program is Zero UKP


Download Mvtools

http://www.lando.co.za/Lennie/freedownloads.htm

Bob

unread,
Dec 14, 2002, 7:26:53 PM12/14/02
to
Write a text file and send it by executing BLAT from pick. BLAT is a free
command line emailer.

-Bob

"arbntl" <arb...@ntlworld.com> wrote in message
news:kGIK9.839$9W5.1...@newsfep2-win.server.ntli.net...

Kilo MicroAir

unread,
Dec 14, 2002, 9:26:04 PM12/14/02
to
It can be done for free.

Here is a VBScript used on a D3/NT System.

mail.wsf

<job>
<script language="VBScript">

Set objArgs = WScript.Arguments
Set objNewMail = CreateObject("CDONTS.NewMail")

objNewMail.From = objArgs(0)

objNewMail.To = objArgs(1)

objNewMail.Cc = objArgs(2)

objNewMail.Bcc = objArgs(3)

objNewMail.Subject = objArgs(4)

objNewMail.BodyFormat = 0
objNewMail.MailFormat = 0

objNewMail.Body = objArgs(5)

If objArgs.Count = 7 Then
objNewMail.AttachFile(objArgs(6))
End If

objNewMail.Send
Set objNewMail = Nothing

</script>
</job>

Then in a basic program create your email message, create an attachment and
copy attachment to c:\email
And create a command using the above windows script.

EMAIL.CMD = "!cscript mail.wsf"; * Windows Scrip Command
EMAIL.CMD = EMAIL.CMD : \ "\ : FROM.ADDR : \"\; * From
EMAIL.CMD = EMAIL.CMD : \ "\ : EMAIL.ADDR : \"\; * To
EMAIL.CMD = EMAIL.CMD : \ "\ : CC.ADDR : \"\; * CC
EMAIL.CMD = EMAIL.CMD : \ ""\; * Blind Copy
EMAIL.CMD = EMAIL.CMD : \ "D3 Email"\; * Subject
EMAIL.CMD = EMAIL.CMD : \ "See Email Attachment"\; * Message
EMAIL.CMD = EMAIL.CMD : ' "c:\email\' : EMAIL.ID : '"'; * Attachment
* Execute Command
EXECUTE EMAIL.CMD

Also have SMTP running on your NT Server


"arbntl" <arb...@ntlworld.com> wrote in message
news:kGIK9.839$9W5.1...@newsfep2-win.server.ntli.net...

Frank

unread,
Dec 16, 2002, 3:54:50 AM12/16/02
to
"arbntl" <arb...@ntlworld.com> wrote in message news:<kGIK9.839$9W5.1...@newsfep2-win.server.ntli.net>...

Bonjour !

You can find a complete product (the product can send e_mails, manage
printers, send fax) on our site (www.decibel.fr). The name of the
product is Liszt (the shareware license is limited to one printer and
one fax/e_mail). No more need to create a printer under D3 (NT or Unix
release), just use the NT description of the printer and have access
to all the capabilities of your printer. Please try the product you
will have a complete support to answer to all your questions.

Thank you.

Frank Kethel

Lance

unread,
Dec 16, 2002, 1:05:44 PM12/16/02
to
How is this done under D3Linux?

Lance
"Kilo MicroAir" <kilo...@gci.net> wrote in message
news:uvnpu7j...@corp.supernews.com...

Alan Gruskoff

unread,
Dec 16, 2002, 1:19:30 PM12/16/02
to
Recall that most of the world runs on Sendmail on Unix or Linux, so this
is easy.

I am certain there are lots of ways to do this, I know this works in the
way I want it to from an automated command line. Use mutt, a text based
email client that is very full featured, just green screen. It has a
command line mode as most *nix programs do. You make up a flat ASCII
text file for the contents, with optional attachment of any file you
might like to attach. The mutt uses the builtin sendmail (or whatever)
to send it out. Works fine.

Example code:

subject = "Command Line Emailing"
address = "al...@performantsystems.com"
attachment = "salesreports.pdf"
text.file = "content.txt"
**
command = \!mutt -s "\: subject
command := \ -a \: attachment
command := \ \ :address
command := \ < \:text.file
execute command

- Alan Gruskoff
www.performantsystems.com

Jeffrey Kaufman

unread,
Dec 16, 2002, 2:09:56 PM12/16/02
to
Here is a subroutine I use with D3/Linux. It was given to me and I enhanced
it some. I left out the line numbers to make it is easier for you to copy
and paste into a program.

SUBROUTINE SR.UT.UNIX.SENDMAIL (FROM.ID, BOUNCE.ID, TO.ID, SUBJECT,
REPLY.ID, MESSAGE,
ATTACHMENT, FROM.NAME, TEXT.FORMAT, ERR)
********************************************
* PROGRAM TO SEND EMAIL USING THE UNIX
* SEDNMAIL PROGRAM.
*
*
* (c) Copyright 1991 - 2002, Key Data Systems Group
* All rights reserved. 559-432-3832 USA
* JEK 11/14/2000, 10/08/2001
********************************************
*************************************************************************
* Copyright Infinetivity, Inc. 2000 as an unpublished work. All rights *
* reserved. This work is the property of and embodies confidential *
* information proprietary to Infinetivity, Inc. and shall not be *
* reproduced, copied, used, disclosed or transferred in any manner *
* without the expressed written consent of Infinetivity, Inc. *
*************************************************************************
* Written By : Mike Derheim, Southwest Data Systems
* Date Written : 11/09/2000
* Description : Updated subroutine to send email messages.
*
COMMON /KDS01/ FILES(300),KDS01.INIT
COMMON /KDS02/ KPRMS(300),KDS02.INIT
*---------------------*
*D E F I N A T I O N S*
*---------------------*
PROGRAM.NAME = 'PICK.SENDMAIL'
ERR.MSG = ''
NOW = TIME()
TODAY = DATE()
MP.HEADERS = ''
ERR = ''
AM=CHAR(254)
VM=CHAR(253)
*---------------------------*
*M A I N L I N E L O G I C*
*---------------------------*
*
* First Alloc temp file(s) and Error Checking
*
*
OPEN 'MD' TO F.MD ELSE
PRINT @(0,23):@(-4):@(0):'CANNOT OPEN FILE "MD" ':
INPUT ANY,1: ; PRINT @(0,23):@(-4):
GOTO 999
END
*
WRITE "Q":AM:AM:"unix:/tmp" ON F.MD, "UNIX.TEMP.FILE"
MY.PORT = FIELD( OCONV( '','U50BB'), ' ', 1 )
OPEN 'UNIX.TEMP.FILE' TO F.UNIX.TEMP.FILE ELSE
PRINT @(0,23):@(-4):@(0):'CANNOT OPEN FILE "UNIX.TEMP.FILE (/tmp)" ':
INPUT ANY,1: ; PRINT @(0,23):@(-4):
GOTO 999
END
*
MSTIME = SYSTEM(12)
TEMPFILE = MY.PORT:"-":MSTIME:".eml"
*
ATTCHFILE = TEMPFILE:".att"
ATTCHPATH = "/tmp/":ATTCHFILE
*
BEGIN CASE
CASE NOT(INDEX(BOUNCE.ID,'@',1))
ERR.MSG<1,-1> = 'Bounce ID must be a valid email address!'
CASE NOT(INDEX(TO.ID,'@',1))
ERR.MSG<1,-1> = 'To ID must be a valid email address!'
CASE NOT(INDEX(REPLY.ID,'@',1))
ERR.MSG<1,-1> = 'Reply-to ID must be a valid email address!'
CASE (MESSAGE = '') AND (ATTACHMENT = '')
ERR.MSG<1,-1> = 'The routine required either a message or an
attachment!'
END CASE
*
*Setup MSG Text
*
CONVERT VM TO AM IN MESSAGE
CONVERT CHAR(13) TO AM IN MESSAGE
*
* Error checking complete, now call create MIME encoded file attachment if
needed.
*
IF (ATTACHMENT # '') THEN
CALL SR.UT.SWAP (ATTACHMENT, " ", "\ ")
CALL SR.UT.SWAP (ATTACHMENT, ' ', '\ ')
CALL SR.UT.SWAP (ATTACHMENT, '\\' ,'\')
CALL SR.UT.SWAP (ATTACHMENT, '&', '\&')
CMD = '!ls ':ATTACHMENT
EXECUTE CMD CAPTURING ATT.FILE
IF NOT( INDEX( ATT.FILE, "not found", 1 ) ) THEN
MPACK = '!/usr/local/bin/mpack -s "':SUBJECT:'" -o ':ATTCHPATH:'
':ATTACHMEN
EXECUTE MPACK ;*CAPTURING JUNK
READ MP.HEADERS FROM F.UNIX.TEMP.FILE, ATTCHFILE ELSE
ERR = 'File attachment error, process aborted for ':TO.ID
RETURN
END
IF MESSAGE # '' THEN
CALL SR.UT.SWAP (MP.HEADERS, '-----', '---')
MP.HEADERS := AM:AM:AM
END
END ELSE
ERR = 'File attachment does not exist!'
RETURN
END
END
*
* C-Type for attachments.
*
IF (TEXT.FORMAT = 'H') THEN
CONVERT CHAR(10) TO AM IN MP.HEADERS
IF (ATTACHMENT # '') THEN
FOR X = DCOUNT(MP.HEADERS,AM) TO 1 STEP -1
IF(MP.HEADERS<X> = '---') THEN
MP.HEADERS<X+1> = 'Content-type: text/html;'
EXIT
END
NEXT X
END
CALL SR.UT.SWAP (MP.HEADERS, AM, CHAR(13):CHAR(10))
END
*
*Create message record with my new headers.
*
EMAIL.REC = ''
EMAIL.REC := 'From: ':FROM.NAME:'<':BOUNCE.ID:'>':CHAR(10)
EMAIL.REC := 'To: ':TO.ID:CHAR(10)
EMAIL.REC := 'Reply-to: ':REPLY.ID:CHAR(10)
EMAIL.REC := 'Subject: ':SUBJECT:CHAR(10)
EMAIL.REC := 'Return-Path: mi...@swdata.com':CHAR(10)
IF (TEXT.FORMAT = 'H') AND (ATTACHMENT = '') THEN
EMAIL.REC := 'Content-Type: text/html;':CHAR(10)
END
EMAIL.REC := MP.HEADERS:CHAR(10)
IF MESSAGE # '' THEN
EMAIL.REC := MESSAGE:CHAR(10):CHAR(10):CHAR(10)
END
EMAIL.REC := '.':CHAR(10)
EMAIL.REC := '':CHAR(10)
CONVERT AM TO CHAR(10) IN EMAIL.REC
WRITE EMAIL.REC ON F.UNIX.TEMP.FILE, TEMPFILE
*
*If no errors the send message
*
IF ERR.MSG = '' THEN
CMD = '!/usr/lib/sendmail -f ':BOUNCE.ID:' -t < /tmp/':TEMPFILE
EXECUTE CMD CAPTURING DATA RETURNING ERR.MSG
IF ERR.MSG#"0" THEN ERR = ERR.MSG
END ELSE
ERR = ERR.MSG
END
*
*Remove temp files
*
DELETE F.UNIX.TEMP.FILE, TEMPFILE
DELETE F.UNIX.TEMP.FILE, ATTCHFILE
*
* EXIT
*
999 RETURN
*
END

I hope this helps.
Jeff
--

Jeffrey Kaufman
Key Data Systems Group
www.keydat.com
559-432-3832
559-432-4657 fax


"Lance" <zzz...@zzzzzzzzzzzzzzzzzzzz.com> wrote in message
news:3dfe1...@news1.mweb.co.za...

kevin zollinger

unread,
Dec 16, 2002, 2:11:36 PM12/16/02
to
Alan Gruskoff <al...@performantsystems.com> wrote in
news:3DFE193...@performantsystems.com:

> Recall that most of the world runs on Sendmail on Unix or Linux, so this
> is easy.
>
> I am certain there are lots of ways to do this, I know this works in the
> way I want it to from an automated command line. Use mutt, a text based
> email client that is very full featured, just green screen. It has a
> command line mode as most *nix programs do. You make up a flat ASCII
> text file for the contents, with optional attachment of any file you
> might like to attach. The mutt uses the builtin sendmail (or whatever)
> to send it out. Works fine.
>

Alan is dead on plus you can also use many other MUA (Mail user agents) to
talk to your MTA (Mail Transfer Agent). If you have a distro that doesn't
include mutt, or you are on another version of unix (HP. IBM, SUN, etc) you
can also use pine, elm, mail, mailx among others. If you want to tie your
solution to a specific MTA you can also usually call the MTA directly from
your program. Many of the other MTAs (qmail, postfix...) provide a sendmail
specific interface allowing you to use the sendmail command with them. For
more information about those commands you can issue a man command: man elm,
man sendmail or whatever.

PS: All mentioned software is open-source and thus free!

PPS: My favorite MUA for program driven email is elm, but that's only
because it is found on so many versions of unix by default.

--
kevin zollinger
ke...@mailsoap.com

doug chanco

unread,
Dec 16, 2002, 9:09:25 PM12/16/02
to
kevin zollinger <ke...@mailsoap.com> wrote in message news:<Xns92E67C0BD...@216.166.71.230>...


Uhhh! as any true sysadmin would tell you , THE ONLY way to send mail
off a unix machine would be sendmail -vt !!!

But honestly if you are sending email off a pick system (D3, jbase,
whatever ....), I would recommand that you make a "mail subroutine" to
accept all the needed/required paramaters and then pass these onto a
unix script or perl program to do the actual mailing. if you are on
windoze then use perl (as it will run on any version of windoze) to
mail out your information.

CWNoah2

unread,
Dec 17, 2002, 5:56:11 AM12/17/02
to
Doug,

I guess you want me to post these routines, since they work so well for us?
;^)

BTW, David M is experimenting with an email print queue (Jbase), such that any
print job sent to this queue will automatically be emailed to the sender. It
works, but sometimes kicks the print queue into I/O ERROR status. :^(

Regards,
Charlie Noah

dcha...@comcast.net (doug chanco) writes:

>Uhhh! as any true sysadmin would tell you , THE ONLY way to send mail
>off a unix machine would be sendmail -vt !!!
>
>But honestly if you are sending email off a pick system (D3, jbase,
>whatever ....), I would recommand that you make a "mail subroutine" to
>accept all the needed/required paramaters and then pass these onto a
>unix script or perl program to do the actual mailing. if you are on
>windoze then use perl (as it will run on any version of windoze) to
>mail out your information.

Charlie Noah (CWN...@aol.com)

PtLin

unread,
Dec 17, 2002, 10:00:56 AM12/17/02
to
Check out a product called Active Fax. Not only can you use it to send faxes,
it also handles e-mails. It runs on a PC, and the system looks at it as
another printer. You've got to include scripts in your printed document so
that Active Fax knows what to do with the document (which includes fax number,
e-mail addresses, etc). It also comes with a client portion, which allows
users to check status of sent documents. It works very slick.

> I'm working with a client whose running his system on D3 on an NT
> platform

doug chanco

unread,
Dec 17, 2002, 12:13:36 PM12/17/02
to
:)

That email queue is an interesting idea ..... I would be interested in
knowing how you are doing this....

also do you get emailed the output or is it reformated before being
emailed?

dougc


cwn...@aol.com (CWNoah2) wrote in message news:<20021217055611...@mb-bh.aol.com>...

CWNoah2

unread,
Dec 18, 2002, 6:52:41 AM12/18/02
to
Doug,

Remember that Jbase print queues are set up as device=PROG lp..... ? He just
plugged in a program in place of lp. The spooler passes all the info he needed
to call EMAIL.SUB. The print job gets sent as is, as an attachment. He actually
set up 2 queues - one with normal TERM settings, and the other with page length
set to 999999. This makes a print job easy to import into Excel. He found out
what was causing the I/O ERROR status. The input buffer wasn't being emptied,
so it was generating a broken pipe error. Clearing the buffer fixed it.

Charlie

do...@chancofamily.com (doug chanco) writes:

>That email queue is an interesting idea ..... I would be interested in
>knowing how you are doing this....
>
>also do you get emailed the output or is it reformated before being
>emailed?
>
>dougc
>
>cwn...@aol.com (CWNoah2) wrote

>> Doug,
>>
>> I guess you want me to post these routines, since they work so well for us?
>> ;^)
>>
>> BTW, David M is experimenting with an email print queue (Jbase), such that
>> any print job sent to this queue will automatically be emailed to the
sender.
>> It works, but sometimes kicks the print queue into I/O ERROR status. :^(
>>
>> Regards,
>> Charlie Noah

Charlie Noah (CWN...@aol.com)

Greg M

unread,
Dec 31, 2002, 2:47:53 PM12/31/02
to
What does the 'mpack' do to the attachments?
I can't find that on the system I am working on.
Also, I am assumming you can replace your SR.UT.SWAP with the d3 SWAP command.

Thanks,

Greg

"Jeffrey Kaufman" <jkau...@keydat.com> wrote in message news:<8ypL9.373268$P31.139254@rwcrnsc53>...

Jeffrey Kaufman

unread,
Dec 31, 2002, 5:39:28 PM12/31/02
to

"Greg M" <mudf...@cox.net> wrote in message
news:8648a5d9.02123...@posting.google.com...

> What does the 'mpack' do to the attachments?
> I can't find that on the system I am working on.

Hmm, I guess I've never sent an attachment because I don't have mpack
either. I believe mpack is part of the mtools set, and it compresses the
attachment.

> Also, I am assumming you can replace your SR.UT.SWAP with the d3 SWAP
command.

Yes, you can use SWAP in leue or our generic swap subroutine.

D De Villiers

unread,
Jan 10, 2003, 4:34:57 AM1/10/03
to
Hello Jeffrey,

I want to use your code in D3Linux (from within a program for SB+) for
sending attachments - How can I fix it ?

Kind Regards,

Lennie De Villiers

EMail: ddevi...@lando.co.za
Web: www.lando.co.za/Lennie
CV/Resume: www.lando.co.za/Lennie/CV.htm

"Real programmers don't document. If it was hard to write, it should
be hard to understand."

Badbizexperience

unread,
Jan 10, 2003, 2:53:02 PM1/10/03
to
Another stupid quote. If this is what you really think, maybe you should change
careers.

terry...@yahoo.com

unread,
Jan 15, 2003, 2:09:36 PM1/15/03
to
Badbizexperience <badbizex...@aol.com> wrote:
> Another stupid quote. If this is what you really think, maybe you should change
> careers.

Pretty obvious why you need to post as an Anonymous Coward. BTW, the chicken
didn't *actually* need to cross the street. He was just wandering around. It
was just a joke.

--
Terry Layne
Portland, OR

0 new messages