Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2002
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Html Mail By Perl

    im new at this perl thing... need help asap...

    i want to send html mail through perl...

    i heard u need to add the

    print MAIL "Content-type: text/html\n\n";

    tag but i cant get it to work...

    can anyone help please !?!?!?!

    i have the print "Content-type: text/html\n\n"; on top also for the html displayed on the page...

  • #2
    New Coder
    Join Date
    Aug 2002
    Location
    Moscow, RU
    Posts
    23
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hello,

    nope this is not correct..
    actually you have to write something like this:

    $MailProgram = '/usr/sbin/sendmail -t';
    open MAIL,"|$MailProgram";
    print MAIL <<TO_END;
    To: $To
    From: $From
    Subject: $Subject
    Content-Type: Text/Plain; Charset="US-ASCII"


    $Message

    TO_END
    close MAIL;

    pay attention to $MailProgram - this variable contain path to sendmail program under linux - you must know or ask hosting provider for it's original location - without it the whole thing will not work. $To variable will contain the user e-mail to whom this mail is. $From - from who e-mail is, $Subject - the subject of message.. also pay attention to Charset - if you need different encoding - you must specify it here. $Message - contain the whole message.

    thats it, hope this will help you

  • #3
    New Coder
    Join Date
    Sep 2002
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks alot ot... it worked out perfect !!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •