Ernie --

While I still say it's the WRONG WAY to do it, here's what you need to
know for this example.

...and then Tucker, Ernie said...
% 
% This did not work . What am I doing wrong?
%  
%  open(MAIL,"| $smail"); 
%                         print MAIL "From: etucker\n";
%                         print MAIL "To: $ubr_info{'email'}\n";
%                         print MAIL "Subject: Errors on $ubr_info{'IP'}\n\n";
%                        print MAIL "content-type: text/html";
%                        print MAIL "<html>";
%                        print MAIL "<p><b> THIS IS A TEST</b></p>";
%                        print MAIL "</html>";

You have the C-T: header (without a newline, mind you) separated from
your headers (thanks to the required-to-separate-headers double newline
you put on the Subject: line) and down in the body.

It might be easiest to just make a structure that will work, like

  From: etucker
  To: $ubr_info{'email'}
  Subject: Errors on $ubr_info{'IP'}
  Content-Type: text/html
  
  <html>
    <b>
      This is a test
    </b>
  </html>

and then wrap it in printable form, like

  print MAIL 
  qq(
    From: etucker
    To: $ubr_info{'email'}
    Subject: Errors on $ubr_info{'IP'}
    Content-Type: text/html
    
    <html>
      <b>
        This is a test
      </b>
    </html>
    );

and go from there.

If you're going to actually construct a mail message, it might be easier
to just use a mail module to do it for you.  Go to CPAN and search for
smtp and/or mime and/or html and/or mail and see what comes out.


% 
% Ernest P. Tucker II 

I can't believe I'm telling someone how to write HTML mail.  I feel so
dirty.


HTH & HAND

:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg26619/pgp00000.pgp
Description: PGP signature

Reply via email to