Sending a file via email from unix to Microsoft Outlook 2000

Sending a file via email from unix to Microsoft Outlook 2000

Post by Nick G. Anagno » Wed, 08 Nov 2000 04:00:00



Need to know if I can send an email from hpux11.0 series 9000 to
Outlook?  I created a shell program that runs on hpux and it creates a
file at the end of the job.  I like to send that daily file to users by
way of Microsoft Outlook.

Nick G. Anagnos

 
 
 

Sending a file via email from unix to Microsoft Outlook 2000

Post by Andrew Chesnoko » Thu, 09 Nov 2000 04:00:00


Hi!



Quote:> Need to know if I can send an email from hpux11.0 series 9000 to
> Outlook?  I created a shell program that runs on hpux and it creates a
> file at the end of the job.  I like to send that daily file to users by
> way of Microsoft Outlook.

> Nick G. Anagnos

If your file is in ascii format you can use very simple script to do this.
Suppose your file named 'filename' than such script will looks like:

{

echo Subject: Your wondering subject

cat filename

Quote:} | sendmail -t

The only thing you need to remember is the path to the sendmail program in
your system.
You can directly specify path to sendmail when you invoke this command or
specify PATH=$PATH:/bla/bla/path-to-sendmail at the beginning of this
script.

If your file is in binary format you need to convert it in ascii form by
mean of 'uuencode' utility which exist in about any system.
This utility usually has 2 parameters - the name of your file and the name
which your file will have after 'uudecode'.

To convert your file from binary to ascii you need to use following command:

uuencode filename filename > /tmp/blablabla

In result you can use the next script to send your data:

PATH=$PATH:path_to_sendmail:path_to_uuencode
uuencode filename filename > /tmp/blablabla
{

echo Subject: Your wondering subject

cat /tmp/blablabla

Quote:} | sendmail -t

If your system has't uuencode you can get the free version of utility from
Internet.

With respects,
Andrew

 
 
 

Sending a file via email from unix to Microsoft Outlook 2000

Post by Nick G. Anagno » Thu, 09 Nov 2000 04:00:00


I went ahead and created the script and set up the path and then ran the
script.  Didn't get any error messages, but didn't see anything in Microsoft
Outlook.  This may be larger than I thought.  I'm betting there a configuration
issues on the unix server and/or  the Outlook email server.

> Hi!



> > Need to know if I can send an email from hpux11.0 series 9000 to
> > Outlook?  I created a shell program that runs on hpux and it creates a
> > file at the end of the job.  I like to send that daily file to users by
> > way of Microsoft Outlook.

> > Nick G. Anagnos

> If your file is in ascii format you can use very simple script to do this.
> Suppose your file named 'filename' than such script will looks like:

> {

> echo Subject: Your wondering subject

> cat filename
> } | sendmail -t

> The only thing you need to remember is the path to the sendmail program in
> your system.
> You can directly specify path to sendmail when you invoke this command or
> specify PATH=$PATH:/bla/bla/path-to-sendmail at the beginning of this
> script.

> If your file is in binary format you need to convert it in ascii form by
> mean of 'uuencode' utility which exist in about any system.
> This utility usually has 2 parameters - the name of your file and the name
> which your file will have after 'uudecode'.

> To convert your file from binary to ascii you need to use following command:

> uuencode filename filename > /tmp/blablabla

> In result you can use the next script to send your data:

> PATH=$PATH:path_to_sendmail:path_to_uuencode
> uuencode filename filename > /tmp/blablabla
> {

> echo Subject: Your wondering subject

> cat /tmp/blablabla
> } | sendmail -t

> If your system has't uuencode you can get the free version of utility from
> Internet.

> With respects,
> Andrew

 
 
 

Sending a file via email from unix to Microsoft Outlook 2000

Post by Oleg Goldshmid » Thu, 09 Nov 2000 04:00:00



> If your file is in ascii format you can use very simple script to do this.
> Suppose your file named 'filename' than such script will looks like:

> {

> echo Subject: Your wondering subject

> cat filename
> } | sendmail -t

Can you explain what is wrong with


?

--

"... We work by wit, and not by witchcraft;
 And wit depends on dilatory time." [Shakespeare]

 
 
 

Sending a file via email from unix to Microsoft Outlook 2000

Post by Andrew Chesnoko » Sat, 18 Nov 2000 04:00:00




> > If your file is in ascii format you can use very simple script to do
this.
> > Suppose your file named 'filename' than such script will looks like:

> > {

> > echo Subject: Your wondering subject

> > cat filename
> > } | sendmail -t

> Can you explain what is wrong with



The difference between sendmail and mail is that sendmail MTA and mail is
user programm which is used to work with user mailbox. If you not need to do
spetial 'mailbox preprocessing' you must avoid to use the 'mail'. mail
utility make special preprocessing of file before it send one. So in some
cases
it inserts special escape characters into the body of message. If you
automaticly process
the sent message later this escape characters can confuse your program
(script) which do the message processing. When you use cat filename |
sendmail -t, you do not encounter such problems.
I have to say that this problem arosed not very often. But I used the
described above mechanisms in different automaticly executed scripts when
managed very large UNIX based network.
Sometimes when I used 'uuencode' at sender side and 'uudecode' at receiver
side I encountered problem: the sended file can't been uudecoded because
it's structure was corrupted somewere inside.
If sendmail was used directly for the message, such problem can't appear.

Andrew