kokeroulis Posted June 21, 2009 Share Posted June 21, 2009 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 More sharing options...
Synook Posted June 21, 2009 Share Posted June 21, 2009 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 More sharing options...
smerny Posted June 21, 2009 Share Posted June 21, 2009 you are forgetting the body of the message after the subject Link to comment Share on other sites More sharing options...
Ingolme Posted June 21, 2009 Share Posted June 21, 2009 you are forgetting the body of the message after the subjectThat 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 More sharing options...
kokeroulis Posted June 21, 2009 Author Share Posted June 21, 2009 No it wasn't send.it doesn't do anything.No errors...Nothing... Does your webserver have a corresponding SMTP server set up? i don't know...How can i check that? Link to comment Share on other sites More sharing options...
Synook Posted June 21, 2009 Share Posted June 21, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.