|
Re: mail to other users with attachment [message #97468 is a reply to message #97467] |
Tue, 28 May 2002 10:29 |
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, "|$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
|
|
|
|