Searched the forum but got no hits on how to do this. I have a script that easily sends mail with information to a user, but how do I attach a small existing file to the mail? I collect information via HTML form the print it to mail like this
my $name = param("name"
print MAIL "Contact name: $name\n";
then send it like this
send_mail('myname@mydomain.com',
$return,
$subject);
somehow there must be a simple way to attach a small file with this (as an attachment, not simply include the contents of the file in the message). For example the file data.txt stored at
/
I would appreciate a complete example of how to do this.
thanks
Steve
my $name = param("name"
print MAIL "Contact name: $name\n";
then send it like this
send_mail('myname@mydomain.com',
$return,
$subject);
somehow there must be a simple way to attach a small file with this (as an attachment, not simply include the contents of the file in the message). For example the file data.txt stored at
/
I would appreciate a complete example of how to do this.
thanks
Steve