Mail Problem.

Joined
Dec 23, 2006
Messages
1
Reaction score
0
I have a problem with automatic mails from a php page which i cant seem to figure out at all.

This is currently what is being used within the page

Code:
mail( $_POST['email'], "Subject Line here", "The message to be sent", "From: My Email");
    echo  "Email sent.<br> 
        <a href='index.php'>Back</a>";
Obviously, There is more to the page but that is the general part.

The problem im having is. That the emails wont get sent out to all who try. I have it on one server that will send to anyone, But yahoo emails. On another it just refuses to send altogether.

Is there a problem in that peice of code? Could it be server related?

Thanks in advance for any help given.

Regards
Luke
 
Also, your server needs to be configured correctly for this to work. See php.ini settings for default SMTP host :smile:

Note that many if not all providers nowadays block SMTP mail coming from their users, so unless you have a working SMTP server installed on your server which you are sure isn't blocked I suggest using your ISP's SMTP server.

I do the same thing on my server, my php.ini file looks like this:
Code:
[mail function]
; For Win32 only.
SMTP = smtp.home.nl
smtp_port = 25

smtp.home.nl is obviously my ISPs SMTP server, you'll have to use your ISP's one. If you're not sure what it is, look at your mail client (if you have one) and check there.
 
Back