| 8:22 pm on Jun 17, 2007 (gmt 0)|
There are many threads on WebmasterWorld about non receipt of emails to Hotmail addresses.
You need to find out if your server's IP address is blacklisted. And then you need to find out if your server has valid PTR records. The latter two points all contribute to hotmail (and others) determining if your email is spam.
| 8:29 pm on Jun 17, 2007 (gmt 0)|
As well as the suggest above, you've got to look at your content. Don't forget to always add a "From: my company <firstname.lastname@example.org>". Make sure that your MX records and server IPs are not blacklisted, even graylisted! Also, make sure that SNMP (that's the function that mail uses to send mail, on *nix and BSD it is) is running under the correct user so you don't get NOBODY var anymore (it should be yourserver.yourisp.com)
| 5:36 am on Jun 18, 2007 (gmt 0)|
Thanks for your suggestions.
Ahmedtheking could you please tell me how can I configure SMTP to apache server. I have following lines in php.ini at present:
; For Win32 only.
;SMTP = localhost ;
smtp_port = 25
; For Win32 only.
sendmail_from = email@example.com ;
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t ;
| 7:18 am on Jun 18, 2007 (gmt 0)|
Now I need a few details from you: Is your machine windows or BSD or *nix based?
| 8:59 am on Jun 18, 2007 (gmt 0)|
That, I believe, is part of your SENDMAIL configuration or your server name configuration. I don't think you can override that by PHP.
| 9:15 am on Jun 18, 2007 (gmt 0)|
We have linux server.
| 1:02 pm on Jun 18, 2007 (gmt 0)|
No it can't be overwritten by PHP, that's why we need to adjust your SNMP settings. Now SNMP is the protocol that sendmail should use in order to send its emails. Because you're not using an SMTP server, you run the risk of looking like junk mail.
You need to look at the users and groups for your server. For example, within the group (say) www would be Apache, PHP, etc... Now, when it comes to sendmail, it should be running as the logged in user, ie 'webserver' (not to be mistaken with www). A reason why you're getting NOBODY@YOURDOMAIN is that sendmail may not have the proper permissions to give itself a name or may not belong to the right group.
So what's the best way? Instead of tinkering and wasting time and maybe causing more problems, I'd suggest you reinstall the whole web server (not the OS) through RPM [rpm.org...] With RPM, you can install and uninstall things nice and easy and add filters. This makes everything a lot less messy.
I, being on a BSD based system, use DarwinPorts and RPM is pretty much the same. Where I would install a web server on DarwinPorts like so:
sudo port install php5 +apache2 +snmp +pcre +mysql5 (You can see how you can add items that can link into the installation with +)
RPM works the same: [rpm.org...]
Now you may be thinking "What?". But trust me. Instead of us going back and forth finding the route of your problem here, it's better to just reinstall it and in a more 'sustainable' way (such as Darwinports and RPM).
| 2:27 pm on Jun 18, 2007 (gmt 0)|
Pass the -f parameter to sendmail when sending mails.
mail('firstname.lastname@example.org', 'subject', 'message', null, '-f email@example.com');
If your Exim config is fine then this should work.
| 8:51 pm on Jun 19, 2007 (gmt 0)|
Your webhost may restrict outgoing email sent to domains through the local mail function other than those on the root server. This can be quite common in an effort to prevent SPAM.
If this is the case, it is unlikely the host will remove this restriction but you can always ask ;-).
Otherwise you can either, get a new webhost that will allow sending of mail from script to other domains, or you can just place the mail script on another server and call it through the cURL function on your website.
You can also use cURL to connect to an smtp server on a Linux server. You will need an smtp relay that allows incoming connections via web - one that does allow this is Gradwell.
If you are scripting to send to external domains through variables, you must ensure your script is secure - it would be a Spambots dream to find it.