Unstoppable Domains

PHP mail function refuses to work

Spaceship Spaceship
Watch

SiKing

Registered MemberEstablished Member
Impact
6
Hey, I am absaloutley clueless as to why this will not work. It's just a simple code but I do not recieve the email.

PHP:
mail('[email protected]', 'Subject', 'message');

[email protected] is obviously the substitute for my email. Thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
make sure that your host hasn't disabled the mail function for security/spam reasons.
 
0
•••
I don't think they have because I've been able to use it before in the past
 
0
•••
Do you get an error message? Ask your admin, I suggest.
 
0
•••
This happened to me before, too. I used to be able to use it, but then it was disabled due to abuse (not my me). You can try to email your hosting admin to see if it was disabled since you used it last. Another host I know of disabled all emails sent except for email addresses that were @TheHostedDomain.com to avoid mass spamming (you could still spam yourself).

What I ended up doing, which I like better anyway, is using Sock. Take a look at:
http://phpmailer.sourceforge.net/

It's a great little script. The installation and crap is a bit confusing. You really only need class.phpmailer.php and class.smtp.php. With those two files, you can send email, but to make things easier, you can make another file (2nd example):
http://phpmailer.sourceforge.net/extending.html

You can set up your defaults there. You won't need this:
// Create an additional function
function do_something($something) {
// Place your new code here
}

and then just include that file. That way you don't have to fill out everything all the time, but if something needs changed, it can be done. The only real configuration that's needed is the host part, which is probably going to be localhost.
 
0
•••
Thanks very much for your help
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back