Results 1 to 6 of 6

Thread: Email Question

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    32

    Email Question

    Dear all,

    I'm using the below mentioned code along with my emails....when i receive an email i see an attachment sign with it......and the mail isn't an attachment...

    When i remove some of the part of it...then i don't see <HTML> emails.....

    I want to send HTML emails....

    Kindly let me know why is it so.....

    Thanks

    FmKing


    ####################################

    $subject = "Subject";
    $cl_mail_boundary = md5(uniqid(time()));
    $mail_headers = "From:<[email protected]>\r\n";
    $mail_headers .= "MIME-Version: 1.0\r\n";
    $mail_headers .= "Content-type: multipart/mixed;boundary=\"$cl_mail_boundary\"";
    $mail_headers .= "\r\n\r\n";
    $mail_headers .= "This is a multi-part message in MIME format.";
    $mail_headers .= "\r\n\r\n";
    $message = "--$cl_mail_boundary\n";
    $message .= "Content-type: text/html; charset=en\r\n";
    $message .= "Content-transfer-encoding: 8bit\r\n\r\n";
    $message .= "The message goes here";

    ####################################

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    for one you are missing half of your charset. and you don't add teh content-type in the message but you add it in the header.

    another is that you don't need all that to send html email.
    PHP Code:
    $subject "Subject";
    $mail_headers "From:<[email protected]>\r\n";
    $mail_headers .= "Content-type: text/html\r\n";

    $message "The message goes here"
    that is all you need.

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    32
    Thanks a lot for replying and pointing out the mistakes.....

    What else do i need to add in the charset........

    And what exactly do i need to send a proper HTML email.

    Thanks

    FmKing

  4. #4
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    I already showed you.
    PHP Code:
    $subject "Subject"
    $mail_headers "From:<[email protected]>\r\n"
    $mail_headers .= "Content-type: text/html\r\n"
    $message "<html><head></head><body>";
    $message .= "The message goes here";
    $message .= "</body></html>"

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    32
    Thanks a lot dear..

    It worked out just fine..
    FmKing

    ***************************
    Sharing Knowledge = Good Deed
    ***************************

  6. #6
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    you're welcome

Posting Permissions

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



Click Here to Expand Forum to Full Width