View previous topic :: View next topic |
Author |
Message |
Flux -
Joined: 13 Oct 2006 Posts: 48
|
Posted: Thu Mar 29, 2007 6:05 am Post subject: php mail() SMTP authentication? |
|
|
So I've got this mail script:
Code: | <?php
$send=mail($to, $subj, $message, $header_from, $addl_params);
if ($send) {
echo 'success!';
} else {
echo 'failure!';
}
?> |
leaving out the impertinent parts, $to is my admin-of-site address (this is generic, not actual): me@mysite.net
$header_from: "FROM: server@mysite.net"
nothing in $addl_params, but that's partially what this thread is asking about.
And everything else has been tested and works with a server NOT requiring authentication (which I have ceased to use because it had other bugs that basically nullified its ability to be an internet-range server).
So, as stated above, I've securely got everything working for this, except for the fact that the [current] mailserver (hosted on the same computer as the webserver) that it sends to rejects the email because it needs authentication.
So I wonder.
Is there a way to give the mailserver authentication by using the additional parameters section, or some other way?
If it helps at all, I use hmailserver (http://www.hmailserver.com/) _________________ My signature is so lame.
I think phpBB forums hates my laptop '.'; |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Thu Mar 29, 2007 7:38 am Post subject: |
|
|
I also use hMailServer, you need to go into the settings and allow no authentication for localhost. I didnt have to do this when I set it up but it may be set to authenticate for every host on new versions. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
Flux -
Joined: 13 Oct 2006 Posts: 48
|
Posted: Fri Mar 30, 2007 6:14 am Post subject: |
|
|
Ah, yet another annoyingly simple solution...
Thanks AbyssUnderground. _________________ My signature is so lame.
I think phpBB forums hates my laptop '.'; |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Mar 30, 2007 3:12 pm Post subject: |
|
|
Flux wrote: | Ah, yet another annoyingly simple solution...
Thanks AbyssUnderground. |
No problem. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
|