Forum Moderators: coopster

Message Too Old, No Replies

PHP Mail Class and AOL

         

gilmour

6:51 am on Mar 10, 2003 (gmt 0)

10+ Year Member



I'm having difficulty with AOL mail clients. I'm using a fairly simple mailing class for login retrival, agent notifications, opt-in confirmation etc. So far am having no trouble with other ISP's except AOL,...it sends a garbled to those users.

Do to the fact it's getting there at all and it's not empty,...I assume it's an encoding issue or possibly multipart/boundary problems. (I am out of my realm of expertise)

Here are the two functions where I presume the trouble to be. Any help would be appreciated.

function build_message($part)
{
$message = $part["message"];
$message = chunk_split(base64_encode($message));
$encoding = "base64";
return "Content-Type: ".$part["ctype"].
($part["name"]?"; name = \"".$part["name"]."\"" : "").
"\nContent-Transfer-Encoding: $encoding\n\n$message\n";
}

function build_multipart()
{
$boundary = "b".md5(uniqid(time()));
$multipart = "Content-Type: multipart/mixed; boundary = $boundary\n\nThis is a MIME encoded message.\n\n--$boundary";

for($i = sizeof($this->parts)-1; $i >= 0; $i--)
{
$multipart .= "\n".$this->build_message($this->parts[$i])."--$boundary";
}
return $multipart.= "--\n";
}

jatar_k

2:42 am on Mar 11, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld gilmour,

Can't say as I know the answer, any more specific info as to the prob? Have you seen one of the messages? I haven't had any real probs with aol but I do very simple emails.

copongcopong

3:52 am on Mar 11, 2003 (gmt 0)

10+ Year Member



have you check out their page at

http:*//postmaster.info.aol.com

?

gilmour

7:34 am on Mar 11, 2003 (gmt 0)

10+ Year Member



Thanks for the welcome. These are simple text emails, no attachments or html. Here is what an AOL mail client gets.

--b5e72f3d6f93e9a52a892e1f8e343b4ec
Content-Type: text/plain
Content-Transfer-Encoding: base64

cmtldC5jb20gQWdlbnRzIGFuZCBNZW1iZXJzIHRvIHBsYWNlIHNvbWUgbmV3IGFkc
R29vZCBNb // 18-20 lines of this, I've cropped it // VHJhdmVsRm
VhbCBjYXRlZ29yeSB0aGF0IHlvdSBoYXZlIGNob3Nlbi4NCg0KDQpBcyBhb

--b5e72f3d6f93e9a52a892e1f8e343b4ec--

jatar_k if you wouldn't mind taking a peek, are you using base64 or 7bit?

jatar_k

3:55 pm on Mar 11, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



As far as encoding goes, I don't set it at all. The only headers I ever use are the from, reply-to, Cc and Bcc with the standard To and Subject. That's it, that's all.

It is possible that if you don't set it it may decide on its own. No idea, but it works fine when I don't set the encoding. Sorry I can't be more help.

nosanity

9:34 pm on Mar 11, 2003 (gmt 0)

10+ Year Member



Post the entire contents of an e-mail (but snip out large portions of base64 code). This will allow us to see what is going on with the rest of the e-mail.

noSanity

mole

10:15 pm on Mar 11, 2003 (gmt 0)

10+ Year Member



Two issues:

first is that AOL is really odd with multipart MIME e-mails - so much so I gave up trying ages ago sending multiple attchments to AOL.

Second, if you're only sending plain text e-mails then can't you get rid of all that stuff that's putting in the MIME boundaries? - that's what's upsetting AOL.

'fraid you need someone with more PHP skill than me to tell you just HOW to simplify it.

gilmour

7:07 am on Mar 13, 2003 (gmt 0)

10+ Year Member



I ended up just using the bare bones mail function with KISS headers as suggested. Seems to be working fine for all ISP's,...thanks for the input.