How to specify SMTP server/host in script, not .ini
Posted 02 March 2006 - 03:57 PM
Tech support at my hosting service tells me that if I just specify the specific IP address as the SMTP server, I won't have to authenticate.
I don't want to change the php.ini file, however, because I think that would open up our site to use by spammers.
So... I want to write the line that specifies the smtp server when the script runs.
What is the exact syntax for that? I haven't been able to find it in any examples or in the tutorials.
I tried inserting
near the beginning but that crashes the script.
is it something like $_SMTP or some other structure to that?
Posted 02 March 2006 - 08:51 PM
Have you tried
Nope, not yet. That may be the ticket I'm looking for.
Now, does that just pass the value for use with this email, or does that alter the actual "php.ini" file?
If my concern is someone using my program as a spam hub, would I be advised to change it back to
when I'm done?
Posted 02 March 2006 - 09:09 PM
Thanks very much for your help, that was exactly what I was looking for.
Posted 03 March 2006 - 09:16 PM
BTW, it should only set it for that page and not change anything in the php.ini file.
That's good to know. Thanks very much for your help.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users