CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
email with html

 



bab
Deleted

Dec 2, 2000, 9:46 PM

Post #1 of 4 (720 views)
email with html Can't Post

simple question I think:
I made a script that sends an html email.
All html works except for the <body> tag.
I want the email to be sent as an html page with black background and color.
Instead I get an html email in b&w as if the <body bgcolor=000000 text=ffffff> wasn't read.
What should I add to the cgi script so that it would send the email with black bgcolor and white text?
=============================================
open ( MAIL,"|/usr/sbin/sendmail -t") &#0124; &#0124; die "Unable to open mail file";
print MAIL "To: $email \n" ;
print MAIL "From: $ref \n" ;
print MAIL "Subject: $sub\n" ;
print MAIL "Content-type: text/html\n\n" ;
print MAIL "<body bgcolor=000000 text=ffffff> <font><b>one two testing....</b></font></body>\n\n";
close(MAIL);
#text appears in bold and I don't see the <font> tag so email is considered html but <body> isn't read


bab
Deleted

Dec 2, 2000, 11:28 PM

Post #2 of 4 (720 views)
Re: email with html [In reply to] Can't Post

I did exactly your code and it doesn't work ...
any ideas why?


Cure
User

Dec 3, 2000, 10:58 AM

Post #3 of 4 (720 views)
Re: email with html [In reply to] Can't Post

open (MAIL, "|/usr/sbin/sendmail -t") &#0124; &#0124; die "Unable to open mail file $!\n";
print MAIL <<END_OF_MAIL;
To: $email
From: $ref
Subject: $subject
Content-Type: text/html\n\n
<html><body bgcolor="#00000" text="#ffffff">
I Love Perl
</body></html>
END_OF_MAIL
close (MAIL);

Cure


Cure
User

Dec 3, 2000, 8:06 PM

Post #4 of 4 (720 views)
Re: email with html [In reply to] Can't Post

Works for me..


Cure

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives