[nycphp-talk] custom mail() with attachment problemusingRH7.3/Apache
Phillip Powell
phillip.powell at adnet-sys.com
Fri Jun 11 13:51:05 EDT 2004
Gabriel PREDA wrote:
> - Problem lies in "mime_content_type" it's not a good function even
> if you have magic.mime... not to mention if you do not have it.
> It's sort of undocumented function : "Returns the MIME content type for
>a
> file as determined by using information from the magic.mime file. Content
> types are returned in MIME format, like text/plain or
> application/octet-stream."
> But it says not what happens if it fails... or if the file has an
> unrecognizable mime. Try to use something else
>
> - You're using a custom line break although in PHP manual says:
>"You
> must use \r\n to separate headers, although some Unix mail transfer agents
> may work with just a single newline (\n)." Also note SMTP and MINE
>standards
> (RFC821/822 and ancestors) that require messages to have \r\n . :)
>
>
Well, here's one for the books.. "\r\n" fails (email is either mangled
or never sent at all!), but "\n" works just fine!
So I can't use \r\n to separate headers even though it's required for me
to do so!
Phil
> - You do not have a charset definition in header: <start>
> Content-Type: text/plain; charset="iso-8859-1" </end>
>
> - If your mail server requires authentication you need to
> communicate directly via sockets.
>
> - A misssssconfigured SENDMAIL cand return false if it has some
> errors... even though the mail was sent...
> - Take note that RFC 821 prohibits lines longer than 998 bytes.
>
> - Speed-wize you should notice that mail() is extreeeeemly slower
> that "sockets"... if you send many emails in a loop PHP opens and closes a
> connection for every mai lyou send... compared with sockets when (if you
> write good code) you have only one connection opened and multiple mail
> sent...
>
>
> With all these problems... found in 5 minutes.. .what if I would have spent
> 30 mins or 1 day...
>
> It's amaizing that we are able to send mail... :))
>
> Gabriel PREDA
> www.amr.ro
>
>_______________________________________________
>talk mailing list
>talk at lists.nyphp.org
>http://lists.nyphp.org/mailman/listinfo/talk
>
>
>
--
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
BPX Technologies, Inc.
#: (703) 709-7218 x107
Fax: (703) 709-7219
More information about the talk
mailing list