Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there an email util to do this

Status
Not open for further replies.

sixtoedsloth

IS-IT--Management
Jan 1, 2002
118
GB
Hi,

I have a program that generates report files(ascii)
and i need to email these to clients.

i wondered if there was a commandline util to be able to
send these emails directly without using sendmail et al.

cheers

Russ
 
Are you trying to script an automated e-mail routine? I figured out how to do this once, but never ended up implementing it. I used "submit" to send the e-mail, which is one of the behind the scenes programs of sendmail. You can do a man of "submit" for more info.

Here is a simple script for sending an attached file by e-mail using submit:

Code:
(
echo &quot;From: <from_address@your_domain.com>&quot;
echo &quot;To: <destination_address@their_domain.com>&quot;
echo &quot;CC: <carbon_copy_address@cc_domain.com>&quot;
echo &quot;BCC: <blind_carbon_copy_address@bcc_domain.com>&quot;
echo `date '+Date: %a, %d %b %Y %H:%M:%S'`
echo &quot;Subject: Whatever_subject_you_want&quot;
echo &quot;Message-Id: <&quot;`date '+%d%m%y`$$&quot;.your_domain.com>&quot;
uuencode path_of_attachment name_as_seen_by_recipient
) | /usr/mmdf/bin/submit -tmnrxto,cc,bcc*

You can hard code the addresses or determine them based on any scriptable rules. If you don't need to CC or BCC just omit those lines.
 
does sco 5.0.5 have sendmail? when i type mail i seem
to get a mail client, but it wont send to external addresses

even though i can ping them etc.
 
I'm on sco 5.0.6, but there seem to be a number of posts from people with earlier versions using sendmail, so my guess is yes.

Do you get anything if you try to man sendmail?

I don't use sco as my mail server, I have a separate mail server on the same network that also routs any emails sent out from sco to their appropriate destinations. I am able to send mail both within and out of my network.

I don't recall any special setup to get sendmail to work, however the sco box does need to be set up for internet access and name resolution. When you ping the external addresses are you pinging the name or the ip address? You should be able to ping the name.
 
5.0.5 has sendmail but it may not have been installed by default. mmdf is the default.

swconfig | grep -i send
will tell you if it is installed.
if it isn't then you can get the latest at
ftp://ftp.sco.com/pub/updates/OpenServer/CSSA-2003-SCO.6.2/CSSA-2003-SCO.6.2.txt
 
cheers, it wasnt installed so i downloaded it and did the
install from scoadmin, but it said that another mail program was installed, so it wouldnt install sendmail.

how do i go about removing the existing mail client, and will things stop working? we dont use mail at all, but
i believe the system processes use it?

thanks

russ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top