![]() |
| ||
| Generate Email script How can i make this script work? It is meant to send an email to a person with a confirmation code, but it is not working. whats wrong with it? <?php |
| ||
| Re: Generate Email script What kind of error are you getting? The odds are the problem lies somewhere else in the code. |
| ||
| Re: Generate Email script We can't debug unless we know what the problem is :) The format for the output should be headers, then a single blank line, and then the message. |
| ||
| Re: Generate Email script Well, its just not sending the email at all! |
| ||
| Re: Generate Email script You'll need to echo out some variables in your script to make sure you have the right information there and to make sure you are getting there at all. |
| ||
| Re: Generate Email script What OS is your server on? Windows requires an SMTP server. |
| ||
| Re: Generate Email script Its clustered linux servers i think |
| ||
| Re: Generate Email script Quote:
You'll need to place some debugging into your code. for starters: [PHP]if (!mail(....)) { echo 'Mail is not working... '; }[/PHP] mail() will return Boolean true or false if working or not respectively. Set your error reporting to max: [PHP]error_reporting(E_ALL); ini_set('display_errors', 'true'); // not sure bout this one, I think thats the correct config option[/PHP] Just try a simple mail() first.. don't use the abstraction function "send_mail".. just to test if its working. Check if your hosting company's mail servers are not blacklisted. Send emails to a few different addresses to make sure its not specific to an email address... |
| All times are GMT -4. The time now is 4:57 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC