I am currently with a host that has disabled the PHP mail() function due to abuse. I need to send registration emails from scripts. What would you recommend as another way to send an email through a web script? It can be in any programming language so long as it's highly portable (works on as many web servers as possible). It must also not require any configuration with the webserver, etc. I want a user to be able to upload the script, run it, and have an email in their inbox. I have already tried PHPmailer with no luck. Apparently it also uses the mail() function, unless I can configure it another way? Any ideas?

Thanks!

    Hi:

    First thing that you should try is to find another web hosting provider company. I can't figure how some budy can disable mail() function.

    There are many ways to stop spammers by wrapping mail() function and more ... any way that's the first thing ... try another web hosting company.

    The seccond one is, maybe you could try to execute directly the sendmail program wich is available on the most unix boxes ( it is called "sendmail" en 99.99% of boxes ). If the "nobody" or "apache" user is available to execute this program you can pass a flow of proper data to send your emails.

    Regards,
    Javier

      PHPMailer includes a SMTP class that I've used successfully as an alternative to mail().

        I'm not very familiar with SMTP. How user friendly is it? I'm not sure all of what is involved with SMTP.

          If you use the PHPMailer class, it pretty much does all the work for you. Basically, it's just like connecting to your ISP's mailbox with Outlook (or whatever mail client you use). You tell the class what the mail host is, the login name, and the password, and that you want to use SMTP (the IsSMTP() method call). Take a look at the example about half way down this page: http://phpmailer.sourceforge.net/

            So if I gave this script to someone else would they then have to have their own SMTP server to connect to and include that info with the script? I need a more adaptable script. Again, I don't know much about it, but is sendmail easily accessible? Are there already written scripts for it that I just have to plug in?

            Thanks again

              Contact your provider and have them reinstate the mail() function; it is rediculous to disable the function because of abuse; they should disable the account which is abusing it instead!

              Mark

                I have contacted my provider (it's how I discovered the problem in the first place) and they will by no means reactivate the mail() function. When I heard this, I left them (with time still left in my hosting purchase) and went to another provider. Well, the new provider did the same thing after a few days, then months later banned my account (the website was not even doing anything during this time) and wont return my emails. So back to the first host I go because it is already paid for and great hosting. I pay $10/year for shared hosting that has unlimited storage, unlimited bandwidth, unlimited everything. It may be shared hosting but it's all I need. It's an ebay deal but I've been hosting with them for a couple years and no problems. Does anyone know of any other great hosting deals?

                  I don't know about beating $10/yr, but I pay $7.50/mo for a ton of features and a lot of space/bandwidth (to me... probably not compared to PHPBuilder, but.. shrug).

                  If you would like a link, PM me.

                  I know of cheaper options, but they're rather limited on disk space/bandwidth... so it'd depend on your needs.

                    Write a Reply...