• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Issue with php mail

Red Squirrel

No Lifer
This is very odd. I noticed that when I send using php mail() even if I set a reply-to and from header, the server sends from apache@myhostname.com. But yet if I send to a valid address and get the email it looks like it comes from right host. when I send to an invalid host, that's where it messes up, since the bounce back goes to apache@myhostname.com instead of what I specified in the from and reply-to. What would cause this?
 
Should I just use sockets and open smtp connection directly? I've thought of doing that too, this way I can actually output the server response somewhere (the user, or a log). I'll check out pear::mail as well.
 
Originally posted by: RedSquirrel
Should I just use sockets and open smtp connection directly? I've thought of doing that too, this way I can actually output the server response somewhere (the user, or a log). I'll check out pear::mail as well.

NO point in reinventing the wheel, just use pear:mail or something like phpmimemail
 
pear::mail + pear::email_mine makes it so easy to build html messages with attachments it's not even funny.

And it can do raw smtp if you want it to.
 
Should I just use sockets and open smtp connection directly?

No, you should never build something from scratch when a usable alternative already exists. Chances are pretty good that the other people have been looking at it longer than you and have thought of things, run into problems, etc that you haven't yet.
 
I just gave pear mail a try but I'm at lost at how to install it. I thought I could just drop the folder in my project and include Mail.php but that file includes PEAR.php which I can't find anywhere in that package. I checked their site and it mentions using the "pear" command but no such command exists nor is there an executable that comes with it, so I'm at loss.
 
Back
Top