Jump to content

Problem With Mail Function


kokeroulis

Recommended Posts

HelloI have create a website and i want to send from that website.The problem is that the mail function doesn't work.The code of my page is the following

$to = "some@example.com";$subject = "text";$from = "my_email@example.com";mail($to, $subject, $from);

Link to comment
Share on other sites

Does it send the email at all? Does your webserver have a corresponding SMTP server set up? Are there any error messages?The full code would also be good.

Link to comment
Share on other sites

you are forgetting the body of the message after the subject
That wouldn't explain why it's not sending, because $from is behaving as the body of the message.
Link to comment
Share on other sites

i don't know...How can i check that?
If you are on a dedicated server or hosting on your home computer, and you don't remember setting up one, then you haven't. If you are on a shared server, ask the administrators.If you haven't set one up and can, you can either use an external server or install one on the machine itself. If you use an external one just enter its details in the php.ini file (search for SMTP). If you want to install your own, do so, then enter localhost in the SMTP field.Also, make sure PHP is running, etc.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...