Home » Infrastructure » Unix » mail to other users with attachment
mail to other users with attachment [message #97467] Mon, 27 May 2002 19:34 Go to next message
mecu
Messages: 2
Registered: May 2002
Junior Member
Hello,
How can I send mail to other users with attachment in UNIX?
Thanks
Re: mail to other users with attachment [message #97468 is a reply to message #97467] Tue, 28 May 2002 10:29 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Using Perl:
===========
#!/usr/local/bin/perl
# Path to sendmail.
##$mail_prog = "/usr/lib/sendmail";
$mail_prog = "/usr/bin/mailx";
# Who is the e-mail going too?
$to = "john.doe@mail.com, jill.doe@mail.com";
# Who shall it reply to?
$reply_to = "john.doe@mail.com";
# Who is it from?
$from = "john.doe@mail.com";
# What is the subject?
$subject = "Rich Text";
#-----------------------------------------------#
# START TO SEND THE E-MAIL OUT
open (MAIL, "&#124$mail_prog -t");
print MAIL "To: $to <$to>n";
print MAIL "Reply-to: $reply_to <$reply_to>n";
print MAIL "From: $from <$from>n";
print MAIL "Subject: $subjectn";
print MAIL "Content-type: text/htmlnn";
print MAIL "nn";
#----------- start - pull in a file ------------#
print MAIL `cat my_file.html`;
#----------- end - pull in a file   ------------#
print MAIL "nn" ;
close(MAIL);
print "Content-type: text/htmlnn";
print "This e-mail was sent in rich text format.n";
exit;

Using uuencode:
===============
# The following command doesn't work in all email clients (Yahoo used to display the html tags)
uuencode abc.html abc.html | mailx -s "hello html attach" abc@yahoo.com

From pl/sql using utl_smtp:
===========================
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:503989273966
Re: mail to other users with attachment [message #97473 is a reply to message #97467] Mon, 03 June 2002 03:45 Go to previous message
mecu
Messages: 2
Registered: May 2002
Junior Member
Andrew,

Thanks much!!!
Previous Topic: Re: steps to install oracle on unix
Next Topic: Re: diff. oracle 8i / 9i
Goto Forum:
  


Current Time: Thu Apr 18 18:19:19 CDT 2024