Shoot me if this is already in the docs but is it possible to send a variable that 
contains html as an html attachement without it being a file first using Mail::Sender?
 
Eg - 
 
my $html_file_name = "no_existant.html"; # there is no file called 'no_existant.html'
my $html  = "<html><body> Hello, this would actually be more complete html generated 
by the script! </body></html>";
 
 
Is it possible to send $html as an attached file named $html_file_name even though it 
is not in itself file.
The other option I have it to creat a temporary file, mail it, then delete it.
 
What this script does is generate the html code for a contract based on a database 
entry and puts it all in $html.
Then it either prints $html out to the screen to be printed or it emails it to someone.
 
The way I have it now is if they want it emailed is it generates $html, creates a temp 
file, then mails the file , then dleetes the temp file.
 
This is fine but then you have to worry about, building up a lot of files that arenit 
deleted , conflicing filenames, same file name that results in wrong contract being 
sent to a person, etccc....
 
Does that make sense to anyone?
 
Can Mail::Sender do that?
 
If it is in the CPAN page for Mail::Sender just say so, I'm still only part way 
throught that page and this thought occured to me.
 
Thanks
 
Dan
 


Reply via email to