Click to See Complete Forum and Search --> : sending mail without mail()
PunkSktBrdr01
08-19-2003, 10:29 AM
I have an area on my site where users can sign up, and I need to automatically email their password and username to them. The problem, though, is that I cannot use mail(). My host has safe mode enabled, and I cannot mail() anything to any domain other than my own. My host mentioned FSOCK, but I don't know how to use this. I read about it at php.net, but I can't figure it out. Thanks!
If you look through the user comment for fsockopen() (http://us2.php.net/manual/en/function.fsockopen.php), there is one example of sending mail using SMTP.
On a side note, are you paying for your hosting? If so, I'd complain about the PHP being run in safe mode...
diamonds
08-19-2003, 10:44 AM
If you are paying...
download all your files onto a CD-rom/local hard drive.
First: threaten them that you will leave if they do not turn the safe-mode off.
step two: If they still refuse, remove your account (make sure you have downloaded all your files!). They should come back saying "STOP! we'll do anything to get a coustmer back! PLEASE!". tell them you will come back-if and only if thry disable safe mode.
P.S. do you have access to your PHP.ini file? if you do, there is an option called safe mode. disable it.
If the host allows users access to the php.ini file, fine a new host for sure...
PunkSktBrdr01
08-19-2003, 10:54 AM
Thanks for your suggestions. I would threaten to leave, but the prices are incredibly low. I'm only paying $30/year for 5gb of space and 6gb of monthly transfer. Plus I get CPanel and tons of other stuff! I haven't found a better deal. If you know of any other hosts that have comparable pricing, with CPanel, MySQL, and plenty of space, let me know.
Not nearly the same amout of space, but http://www.dr2.net is what I use and am happy with.
diamonds
08-19-2003, 11:02 AM
misspelling...
I meant "find" not "fine"...
I cannot edit my post now that someone has responded...
Last edited by diamonds on 08-19-2003 at 11:14 AM
Oh... wait: I can:p
diamonds
08-19-2003, 11:11 AM
Why not host it at home?
er- mabye not. How hosting companys run other servers is that one computer runs up to 1000 websites, so the electricbill-to-website racio is the highest possable.
With this in mind, It only takes a hosting company as little as two dollars a year-per-website to run: including the DNS address, ISP fees and the electric bill.