MIME_BASE64_TEXT

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

    #1

    MIME_BASE64_TEXT

    Hi Folk

    Is there anyway in avoiding the Spam Assassin tag:
    MIME_BASE64_TEX T: Message text disguised using base64 encoding

    when sending email using the mail() function?



    - Nicolaas






  • Andy Hassall

    #2
    Re: MIME_BASE64_TEX T

    On Fri, 11 Nov 2005 12:33:30 +1300, "windandwav es" <winandwaves@co ldmail.com>
    wrote:
    [color=blue]
    >Is there anyway in avoiding the Spam Assassin tag:
    >MIME_BASE64_TE XT: Message text disguised using base64 encoding
    >
    >when sending email using the mail() function?[/color]

    Don't disguise your message text using base64 encoding would be the obvious
    answer? Are you saying you're getting false positives despite not
    base64-encoding?
    --
    Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
    http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

    Comment

    • windandwaves

      #3
      Re: MIME_BASE64_TEX T

      Andy Hassall wrote:[color=blue]
      > On Fri, 11 Nov 2005 12:33:30 +1300, "windandwav es"
      > <winandwaves@co ldmail.com> wrote:
      >[color=green]
      >> Is there anyway in avoiding the Spam Assassin tag:
      >> MIME_BASE64_TEX T: Message text disguised using base64 encoding
      >>
      >> when sending email using the mail() function?[/color]
      >
      > Don't disguise your message text using base64 encoding would be the
      > obvious answer? Are you saying you're getting false positives despite
      > not base64-encoding?[/color]

      My messages are 64 encoded. If you dont do this (they are html), then you
      get nonsense!

      Basically, I am wondering if anyone out there has a basic PHP mailing
      function that is similar to the one below, but reduces spam levels.


      function SendMail($From, $FromName,$To , $ToName,$Subjec t,$Text,$Html,
      $returnaddress) {
      //die("from ".$From." From Name: ".$FromName ." to mail: ".$To." to Name:
      ".$ToName." subject: ".$Subject. " text: ".$Text." html: ".$Html."
      returnaddress: ".$returnaddres s);
      $OB="----=_OuterBoundary _000";
      $IB="----=_InnerBoundery _001";
      $From or die("sender address missing");
      $To or die("recipient address missing");
      $headers ="MIME-Version: 1.0\r\n";
      $headers.="From : ".$FromName ." <".$From.">\n ";
      $headers.="To: ".$ToName." <".$To.">\n" ;
      $headers.="Repl y-To: ".$FromName ." <".$From.">\n ";
      $headers.="Cont ent-Type: multipart/mixed;\n boundary=\"".$O B."\"\n";
      //Messages start with text/html alternatives in OB
      $Msg ="This is a multi-part message in MIME format.\n";
      $Msg.="\n--".$OB."\n";
      $Msg.="Content-Type: multipart/alternative;\n boundary=\"".$I B."\"\n\n";
      //plaintext section
      $Msg.="\n--".$IB."\n";
      $Msg.="Content-Type: text/plain;\n charset=\"iso-8859-1\"\n";
      $Msg.="Content-Transfer-Encoding: quoted-printable\n\n";
      $Msg.=$Text."\n \n";
      // html section
      $Msg.="\n--".$IB."\n";
      $Msg.="Content-Type: text/html;\n charset=\"iso-8859-1\"\n";
      $Msg.="Content-Transfer-Encoding: base64\n\n";
      $Html =stripslashes($ Html);
      $Msg.=chunk_spl it(base64_encod e($Html))."\n\n ";
      // end of IB
      $Msg.="\n--".$IB."--\n";
      //message ends
      $Msg.="\n--".$OB."--\n";
      if(!$subject or $subject = "") {
      $subject = "message from ".$FromName ;
      }
      if($returnaddre ss) {
      $returnaddress = '-f'.$returnaddre ss;
      }
      mail($To,$Subje ct,$Msg,$header s, $returnaddress) ;
      syslog(LOG_INFO ,"Mail: Message sent to $ToName <$To>");
      return 1;
      }

      TIA

      - Nicolaas


      Comment

      • Philip Ronan

        #4
        Re: MIME_BASE64_TEX T

        "windandwav es" wrote:
        [color=blue]
        > My messages are 64 encoded. If you dont do this (they are html), then you
        > get nonsense![/color]

        .... so your messages were nonsense to start with? :-D

        Seriously though, you need to sit down and read RFC2045. There are other
        ways of encoding the body of an email besides base64. Try quoted-printable,
        for example.

        A quick search at Google should provide you with all the information you
        need.

        --
        phil [dot] ronan @ virgin [dot] net


        Comment

        • Tim Roberts

          #5
          Re: MIME_BASE64_TEX T

          "windandwav es" <winandwaves@co ldmail.com> wrote:
          [color=blue]
          >Andy Hassall wrote:[color=green]
          >> On Fri, 11 Nov 2005 12:33:30 +1300, "windandwav es"
          >> <winandwaves@co ldmail.com> wrote:
          >>[color=darkred]
          >>> Is there anyway in avoiding the Spam Assassin tag:
          >>> MIME_BASE64_TEX T: Message text disguised using base64 encoding
          >>>
          >>> when sending email using the mail() function?[/color]
          >>
          >> Don't disguise your message text using base64 encoding would be the
          >> obvious answer? Are you saying you're getting false positives despite
          >> not base64-encoding?[/color]
          >
          >My messages are 64 encoded. If you dont do this (they are html), then you
          >get nonsense![/color]

          That SENTENCE is nonsense. Most text/html sections are sent as
          quoted-printable, 8bit, or 7bit. Base64 encoding serves no purpose other
          than to increase the size by 25%.
          --
          - Tim Roberts, timr@probo.com
          Providenza & Boekelheide, Inc.

          Comment

          • windandwaves

            #6
            Re: MIME_BASE64_TEX T

            Tim Roberts wrote:[color=blue]
            > "windandwav es" <winandwaves@co ldmail.com> wrote:
            >[color=green]
            >> Andy Hassall wrote:[color=darkred]
            >>> On Fri, 11 Nov 2005 12:33:30 +1300, "windandwav es"
            >>> <winandwaves@co ldmail.com> wrote:
            >>>
            >>>> Is there anyway in avoiding the Spam Assassin tag:
            >>>> MIME_BASE64_TEX T: Message text disguised using base64 encoding
            >>>>
            >>>> when sending email using the mail() function?
            >>>
            >>> Don't disguise your message text using base64 encoding would be the
            >>> obvious answer? Are you saying you're getting false positives
            >>> despite not base64-encoding?[/color]
            >>
            >> My messages are 64 encoded. If you dont do this (they are html),
            >> then you get nonsense![/color]
            >
            > That SENTENCE is nonsense. Most text/html sections are sent as
            > quoted-printable, 8bit, or 7bit. Base64 encoding serves no purpose
            > other than to increase the size by 25%.[/color]


            Hmmm, it is getting difficult. Does anyone have a good send mail function,
            which basically extends the mail() function so that you can does pass the
            basic variables?

            I had a look on the net, but no luck. Im my previous post you can see what
            I use now. I also found the function below on the www.php.net website:

            function quoted_printabl e_encode( $sString ) {
            $sString = preg_replace( '/[^\x21-\x3C\x3E-\x7E\x09\x20]/e', 'sprintf(
            "=%02x", ord ( "$0" ) ) ;', $sString );
            preg_match_all( '/.{1,73}([^=]{0,3})?/', $sString, $aMatch );
            return implode( '=' . CR, $aMatch[0] );
            }



            Comment

            • Manuel Lemos

              #7
              Re: MIME_BASE64_TEX T

              Hello,

              on 11/10/2005 09:33 PM windandwaves said the following:[color=blue]
              > Hi Folk
              >
              > Is there anyway in avoiding the Spam Assassin tag:
              > MIME_BASE64_TEX T: Message text disguised using base64 encoding
              >
              > when sending email using the mail() function?[/color]

              You should send your message text or HTML encoded with quoted-printable
              encoding instead of base64. You may want to try this class that can be
              used to encode your message properly and send them with the mail function:

              http://www.phpclasses.org/mimemessage


              --

              Regards,
              Manuel Lemos

              Metastorage - Data object relational mapping layer generator


              PHP Classes - Free ready to use OOP components written in PHP
              http://www.phpclasses.org/

              Comment

              Working...