Hey, I´m developing an webmail app (for POP3/SMTP servers type) and have
troubles of the same time, but using the internal mail() command, but i have
developed  an SMTP class that uses the sockets functions to connect to a
given SMTP server (ie: 127.0.0.1) and compose a message. The only parameters
that uses is:
-sender (only the dir or dir and name) and a optional reply-to dir & name
- A function call to add recipients with the following params: dir,
name(optional) and type (to, cc, bcc) that determines in what line of the
headers includes it (to: cc: none-if bcc-)
-server, helo msg
-the body (procesed, working on a body proceser)

And i make an MIME mail decoder that decodes attachs and formats(the imap
command that do this not work with POP3)

If you are interested on this please mail me and i will send it (and i
encounter a similar class on PEAR Repository on pear/net/smtp &/mail/*
classes)

I hope you encounter mi response satisfactory

Gonzalo Vivanco Mocorrea

--
"Nicolas" <[EMAIL PROTECTED]> escribió en el mensaje
018b01c1fb76$55993060$5cdf87d9@bs846977">news:018b01c1fb76$55993060$5cdf87d9@bs846977...
Perhaps you could pass these comments on to the relevant people...

I've just finished writing the main part of a mail client for a website in
PHP, using the IMAP functions to talk to SMTP and POP3 servers.

I've rarely had so much trouble understanding a language construct...
Firstly, the documentation left loads out, requiring extensive use of Google
to track down people who had had the same problem and provided workarounds.

Secondly, the imap_compose_mail function provides output that is useless
when used with other PHP functions such as MAIL, because mail() requires
that I quote the message headers separately from the message body, so I have
to migrate to a lower level of programming and open sendmail sockets and the
like rather than using built-in functions that one would expect to find.
After all, if you've gone to the trouble of building a function to put MIME
messages together, it's reasonable to expect you've got a function that
mails the output!

Finally, the IMAP functions sometimes put \n\r at the end of header lines --
when these are received by outlook, the additional \r is interpreted as
meaning that this is the end of the headers, and therefore the MIME header
lines are treated as message body, requiring further editing of the
imap_mail_compose output.

All this would have been fine if I hadn't had to find out the hard way, by
spending hours trying to figure out what was going wrong - and could
probably therefore be fixed with some updating of the documentation.  The
most common comment I found on all the PHP message boards was that the
example given in the PHP manual under imap_mail_compose() was flawed, didn't
work and was incomplete.

I'm not trying to be negative, this only really stands out because its
juxtaposed with the excellent quality of the rest of the documentation.

Nicolas.




Reply via email to