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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

emailscript, how to get the attachment

Status
Not open for further replies.

pho01

Programmer
Mar 17, 2003
218
US
I have set up a email alias that calls an hpux script whenever an email is sent to the alias. When we send an email message to the alias, do a cat on the script would get the message just fine. And the script runs well.

My issue is how do the script (shell script) get the attachment and save the attachment on the server? Of course cat doesn't work, it will get something like:
PGh0bWw+DQo8aGVhZD48c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KPCEtLQ0KLnBhZ2VIZWFk
PGh0bWw+ZXIg
ew0KCXRleHQtYWxpZ246IGxlZnQ7DQoJd2lkdGg6IDEwMCU7DQoJcGFkZGluZy1ib3R0b206IDEw
cHg7DQp9DQoucGFnZUhlYWRlciAudGl0bGUgew0KCWZvbnQtZmFtaWx5OiBWZXJkYW5hLCBBcmlh
bCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmOw0KCWZvbnQtc2l6ZTogMTRweDsNCglmb250LXdlaWdo
dDogYm9sZDsNCgljb2xvcjogIzY2NjY2NjsNCgl9DQoudGV4dEdlbmVyYWwgew0KCWZvbnQtZmFt
aWx5OiBWZXJkYW5hLCBBcmlhbCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmOw0KCWZvbnQtc2l6ZTog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top