Welcome to WebmasterWorld Guest from 188.8.131.52
I am using mail() function on Apache server.
My header entries are as follows:
$rheader = 'MIME-Version: 1.0' . "\r\n";
$rheader .= 'To: ' . $toemail . "\r\n";
$rheader .= 'From: Info <firstname.lastname@example.org>' . "\r\n";
$rheader .= 'Reply-To: Info <email@example.com>' . "\r\n";
$rheader .= 'Return-Path: firstname.lastname@example.org' . "\r\n";
The function is working well. I am receiving mails to my account. But for some email accounts specifically HOTMAIL I am not able to send mails. It is not even coming to its Junk folder. What could be the problem? Do I have to add some more entry to the header?
In the received mails the header entry are:
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.7
Received: from nobody by host.vps92.sgvps.net with local (Exim 4.63)
id 1HzZ09-0007ua-E3; Sat, 16 Jun 2007 10:11:41 -0400
Is this NOBODY in "Received: from" a problem? Please guide me what should do?
Thanks in advance.
[edited by: eelixduppy at 12:52 am (utc) on June 18, 2007]
[edit reason] example.com [/edit]
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.
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 ;
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).
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.