Connecting Tech Pros Worldwide Help | Site Map

MIME_BASE64_TEXT

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 10th, 2005, 10:45 PM
windandwaves
Guest
 
Posts: n/a
Default MIME_BASE64_TEXT

Hi Folk

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

when sending email using the mail() function?



- Nicolaas







  #2  
Old November 11th, 2005, 12:05 AM
Andy Hassall
Guest
 
Posts: n/a
Default Re: MIME_BASE64_TEXT

On Fri, 11 Nov 2005 12:33:30 +1300, "windandwaves" <winandwaves@coldmail.com>
wrote:
[color=blue]
>Is there anyway in avoiding the Spam Assassin tag:
>MIME_BASE64_TEXT: 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.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
  #3  
Old November 11th, 2005, 06:45 AM
windandwaves
Guest
 
Posts: n/a
Default Re: MIME_BASE64_TEXT

Andy Hassall wrote:[color=blue]
> On Fri, 11 Nov 2005 12:33:30 +1300, "windandwaves"
> <winandwaves@coldmail.com> wrote:
>[color=green]
>> Is there anyway in avoiding the Spam Assassin tag:
>> MIME_BASE64_TEXT: 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,$Subject,$Text,$Html,
$returnaddress){
//die("from ".$From." From Name: ".$FromName." to mail: ".$To." to Name:
".$ToName." subject: ".$Subject." text: ".$Text." html: ".$Html."
returnaddress: ".$returnaddress);
$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.="Reply-To: ".$FromName." <".$From.">\n";
$headers.="Content-Type: multipart/mixed;\n boundary=\"".$OB."\"\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=\"".$IB."\"\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_split(base64_encode($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($returnaddress) {
$returnaddress = '-f'.$returnaddress;
}
mail($To,$Subject,$Msg,$headers, $returnaddress);
syslog(LOG_INFO,"Mail: Message sent to $ToName <$To>");
return 1;
}

TIA

- Nicolaas


  #4  
Old November 11th, 2005, 08:25 AM
Philip Ronan
Guest
 
Posts: n/a
Default Re: MIME_BASE64_TEXT

"windandwaves" 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
http://vzone.virgin.net/phil.ronan/

  #5  
Old November 21st, 2005, 11:05 PM
Tim Roberts
Guest
 
Posts: n/a
Default Re: MIME_BASE64_TEXT

"windandwaves" <winandwaves@coldmail.com> wrote:
[color=blue]
>Andy Hassall wrote:[color=green]
>> On Fri, 11 Nov 2005 12:33:30 +1300, "windandwaves"
>> <winandwaves@coldmail.com> wrote:
>>[color=darkred]
>>> Is there anyway in avoiding the Spam Assassin tag:
>>> MIME_BASE64_TEXT: 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.
  #6  
Old November 21st, 2005, 11:05 PM
windandwaves
Guest
 
Posts: n/a
Default Re: MIME_BASE64_TEXT

Tim Roberts wrote:[color=blue]
> "windandwaves" <winandwaves@coldmail.com> wrote:
>[color=green]
>> Andy Hassall wrote:[color=darkred]
>>> On Fri, 11 Nov 2005 12:33:30 +1300, "windandwaves"
>>> <winandwaves@coldmail.com> wrote:
>>>
>>>> Is there anyway in avoiding the Spam Assassin tag:
>>>> MIME_BASE64_TEXT: 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_printable_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] );
}



  #7  
Old November 21st, 2005, 11:08 PM
Manuel Lemos
Guest
 
Posts: n/a
Default Re: MIME_BASE64_TEXT

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_TEXT: 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
http://www.metastorage.net/

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.