Why cannot send the MIME html e-mail to gmail?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • stam

    Why cannot send the MIME html e-mail to gmail?

    hello guys, i have met a problem that i can send the html e-mail by
    using MIME via php to yahoo mail and hotmail, but when i was try to
    send to gmail, it show all the html coding.
    can someone help me to solve this kind of problem? thank you


    the coding i made----->:

    <?php
    $a=<<<A
    <form action="" method="post">
    <input type="submit" name="submit" value="submit">
    </form>
    A;
    echo $a;
    if(isset($_POST['submit']))
    {
    $to = 'stam1982@gmail .com,stam_1982@ yahoo.com';

    $subject = 'Testing';

    $message = '
    <html>
    <head>
    <title>Birthd ay Reminders for August</title>
    </head>
    <body bgcolor="gray">
    <p>MIME email!</p>
    </body>
    </html>
    ';

    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
    $headers .= 'Content-Transfer-Encoding: 7bit'."\r\n";

    $headers .= 'From: ck <stam_1982@yaho o.com>' . "\r\n";

    mail($to, $subject, $message, $headers);
    echo "Email had been sent!";
    }
    ?>

    your kindly help is important to me! ^_^

  • Tim Roberts

    #2
    Re: Why cannot send the MIME html e-mail to gmail?

    "stam" <stam1982@gmail .com> wrote:[color=blue]
    >
    >hello guys, i have met a problem that i can send the html e-mail by
    >using MIME via php to yahoo mail and hotmail, but when i was try to
    >send to gmail, it show all the html coding.
    >can someone help me to solve this kind of problem? thank you[/color]

    Well, your e-mail headers are valid. If you will permit the obvious
    question, is your gmail account configured to display HTML email?

    You might try making the email multipart/alternative with a text/plain
    section and a text/html section. You shouldn't have to do that, but it's
    the most common way to do HTML mail.
    --
    - Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

    Comment

    • stam

      #3
      Re: Why cannot send the MIME html e-mail to gmail?

      Thank you for giving me a solution, but how to making the section,
      because when i using boundary gmail also show whole coding that i
      writen. Can u post the example for me.
      Thanks again for your kindly help. ^^

      Comment

      • Tim Roberts

        #4
        Re: Why cannot send the MIME html e-mail to gmail?

        "stam" <stam1982@gmail .com> wrote:[color=blue]
        >
        >Thank you for giving me a solution, but how to making the section,
        >because when i using boundary gmail also show whole coding that i
        >writen.[/color]

        Again I ask, are you sure that your gmail account is configured to display
        HTML e-mail at all?
        --
        - Tim Roberts, timr@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        • stam

          #5
          Re: Why cannot send the MIME html e-mail to gmail?

          I didn't configured anything in gmail, is it default to display HTML
          email?
          and where to configured it? because i cannot find it.

          Comment

          • Tim Roberts

            #6
            Re: Why cannot send the MIME html e-mail to gmail?

            "stam" <stam1982@gmail .com> wrote:
            [color=blue]
            >I didn't configured anything in gmail, is it default to display HTML
            >email?
            >and where to configured it? because i cannot find it.[/color]

            I don't know gmail at all, but the symptoms you describe seem to imply that
            that gmail is just not displaying HTML email. Do you get ANY HTML email
            that is displayed correctly?
            --
            - Tim Roberts, timr@probo.com
            Providenza & Boekelheide, Inc.

            Comment

            • stam

              #7
              Re: Why cannot send the MIME html e-mail to gmail?

              yes, i get html email before, and it is display like html format, but i
              just dun understand that why i can't send the html email to gmail, i
              just can't figure out what happen? my supervisor is rushing me to
              handle this problem as soon as possible, i'm having headache right now!


              Could someone help me on this! thank you

              Comment

              • Manuel Lemos

                #8
                Re: Why cannot send the MIME html e-mail to gmail?

                Hello,

                on 05/03/2006 02:32 AM stam said the following:[color=blue]
                > yes, i get html email before, and it is display like html format, but i
                > just dun understand that why i can't send the html email to gmail, i
                > just can't figure out what happen? my supervisor is rushing me to
                > handle this problem as soon as possible, i'm having headache right now!
                >
                >
                > Could someone help me on this! thank you[/color]

                Your are probably not composing it correctly. You may want to try this
                class for composing and sending e-mail message according to the Internet
                standards.




                --

                Regards,
                Manuel Lemos

                Metastorage - Data object relational mapping layer generator


                PHP Classes - Free ready to use OOP components written in PHP
                Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials

                Comment

                • Tim Roberts

                  #9
                  Re: Why cannot send the MIME html e-mail to gmail?

                  "stam" <stam1982@gmail .com> wrote:[color=blue]
                  >
                  >yes, i get html email before, and it is display like html format, but i
                  >just dun understand that why i can't send the html email to gmail, i
                  >just can't figure out what happen? my supervisor is rushing me to
                  >handle this problem as soon as possible, i'm having headache right now!
                  >
                  >Could someone help me on this! thank you[/color]

                  There was nothing wrong with your original headers. The only thing I can
                  suggest is witchcraft and superstition: move the "From" header before
                  MIME-Version, add a "To" header specifically, etc.
                  --
                  - Tim Roberts, timr@probo.com
                  Providenza & Boekelheide, Inc.

                  Comment

                  • stam

                    #10
                    Re: Why cannot send the MIME html e-mail to gmail?

                    Thanks for your help. but i still cannot send it to gmail. Haiz~ is
                    this my fate or what! it just can't success........ .... Thanks for your
                    guys helping, but i still need solutions to solve this.

                    Comment

                    • Tim Roberts

                      #11
                      Re: Why cannot send the MIME html e-mail to gmail?

                      "stam" <stam1982@gmail .com> wrote:[color=blue]
                      >
                      >Thanks for your help. but i still cannot send it to gmail. Haiz~ is
                      >this my fate or what! it just can't success........ .... Thanks for your
                      >guys helping, but i still need solutions to solve this.[/color]

                      Is your web site publicly available anywhere? I'd love to have it send an
                      e-mail directly to me so I can examine the actual headers that it sent.
                      --
                      - Tim Roberts, timr@probo.com
                      Providenza & Boekelheide, Inc.

                      Comment

                      • stam

                        #12
                        Re: Why cannot send the MIME html e-mail to gmail?

                        i'm still testing the function, so it still didn't publicly. or u just
                        give me ur email address so i just send it to u. thanks

                        Comment

                        • stam

                          #13
                          Re: Why cannot send the MIME html e-mail to gmail?

                          i'm still testing the function, so it still didn't publicly. or u just
                          give me ur email address so i just send it to u. thanks

                          Comment

                          • Tim Roberts

                            #14
                            Re: Why cannot send the MIME html e-mail to gmail?

                            "stam" <stam1982@gmail .com> wrote:[color=blue]
                            >
                            >i'm still testing the function, so it still didn't publicly. or u just
                            >give me ur email address so i just send it to u. thanks[/color]

                            Ummm, my e-mail address is in the signature of every post I make...
                            --
                            - Tim Roberts, timr@probo.com
                            Providenza & Boekelheide, Inc.

                            Comment

                            Working...