Multi part mail message with attachment

Hi,

I downloaded a script to send a mail attachment http://apptools.com/phptools/forms/forms5.php

The script works fine when I send the message to a user and check the mail via usermin, but when I send it out to a domain hosted externally I see the following as the message.

MIME-Version: 1.0

Content-Type: multipart/mixed;

boundary="==Multipart_Boundary_x157bac295a022df570bd2f7af79216e6x"
Message-Id: 20100819231556.5E0D94C174@myhost.mydomain.com
Date: Fri, 20 Aug 2010 09:15:56 +1000 (EST)

This is a multi-part message in MIME format.

–==Multipart_Boundary_x157bac295a022df570bd2f7af79216e6x
Content-Type: text/plain; charset=“UTF-8”
Content-Transfer-Encoding: 7bit

Here is your file: grey1.jpg

–==Multipart_Boundary_x157bac295a022df570bd2f7af79216e6x
Content-Type: image/jpeg;
name=“test.jpg”
Content-Transfer-Encoding: base64
rsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVWTf3Mn+qf1YqkA6Yq7FXYq7FXYq7FXYq7FXYq7

FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXdsVf/9k=

–==Multipart_Boundary_x157bac295a022df570bd2f7af79216e6x–

I am trying to get the form working for a client that doesn’t have their mail hosted on my server.

I have tested on various mail clients so I don’t think that is the problem, the message comes through ok without an attachment so it seems like the multipart bit is causing the error but since it work in usermin and for locally hosted domains I am not sure where to fix it.

Any ideas

Mitch

Still not sure what is causing the problem but I have managed to get the phpMailer script to work so I will use it.