Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

jazzman1 last won the day on September 24 2014

jazzman1 had the most liked content!

About jazzman1

  • Birthday 03/06/1972

Profile Information

  • Gender
    Male
  • Location
    Mississauga, Canada

jazzman1's Achievements

Member

Member (2/5)

91

Reputation

  1. Yep, david is right, since you have a ssh access to this account, login into your terminal and try to call sendmail directly from the shell. Try, again to send me an email with a message od current date/time. The command is: echo `date` | /usr/sbin/sendmail tuparov86@gmail.com // or echo `date` | sendmail tuparov86@gmail.com
  2. yes...that's just fine....so I don't see anything wrong and I don't have any idea why you're running into a false result. Try those two solutions if they don't work maybe someone else would help you on this. 1. <?php $email_to = 'tuparov86@gmail.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: <$email_from>\r\n"; $headers .= "Reply-To: <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; 2. <?php $email_to = 'tuparov86@gmail.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; tuparov86@gmail.com is my testing email, try to send me an email just for the test...
  3. And the name of your domain is "MYDOMAIN.com" or something else....your real domain name?
  4. I amended my script above. when you do a 'view source' in the browser, do you see the hostname? I mean the value of $email_from variable?
  5. Run the following script and let me see the output of echo command. You are doing something wrong. <?php $email_to = 'customer@email.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: Sending Name $email_from\r\n"; $headers .= "Reply-To: The Reply To Name $email_from\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function //if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; echo ($email_to.','.$email_subject.','.$email_message.','.$headers);
  6. Try the following script and give me a feedback <?php $email_to = 'customer_address@example.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: Sending Name <$email_from>\r\n"; $headers .= "Reply-To: The Reply To Name <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; Note: change only the value of $email_to with some actual email address.
  7. No, i want to change all headers string and the mail function as shown below. // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: Sending Name <$email_from>\r\n"; $headers .= "Reply-To: The Reply To Name <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; Make sure that $email_to is the customer mail address and $email_from is the email provided fro your hosting provvider some like - contact@myemail.com. Can you confirm that?
  8. Ops.....sorry it was a typo....the period (.) should be in front of (=) sign, like in others lines exept first one! <?php ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); if(isset($_POST['email'])) { .......... Maybe you have a lot of emails at contact@mydomain.com, check inside this mail box.
  9. Change the headers variable in your script with mine and try again. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers=. "From: Sending Name <$email_from>\r\n"; $headers.= "Reply-To: The Reply To Name <$email_from>\r\n"; $headers.= "X-Mailer: PHP/" . phpversion()."\r\n"; Also, rid off in front of the php mail function this suppress (@) error operator and put the following error_reporting functions at top of the mail script you call. @mail($email_to, $email_subject, $email_message, $headers); // to if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; // at top of the file ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); EDIT: mail_to should be the customer email address (not yours) , and mail_from and mail_reply is the mail address given by your hosting provider (contact@myemail.com). According to the output that's not correct.
  10. Replace this line - @mail($email_to, $email_subject, $email_message, $headers); with - echo ($email_to.','.$email_subject.','.$email_message.','.$headers); and let me see the output.
  11. Open up a console and try next steps: mysql -h localhost -u root -p password: # if it's empty press "ENTER" mysql> use mysql; mysql> update user set password=PASSWORD("insert-the-new-root-password") where User='root'; mysql> flush privileges; mysql> quit; # restart the mysql server for every case and try to log in again
  12. Hi Andreea115, when you send a post data to the server I recommend you to use a object litteral like this: data {} Take a look at this for a minute, how you to make a very simple test in ajax: Create two new files, named - index.php and debug.php, to be located in the same directory (folder) In an index.php file copy/paste this code: <script type="text/javascript" src="// link to jquery "></script> <script type="text/javascript"> var name = 'testajax'; var email = 'jazzman@jazzman.com'; var url = 'debug.php'; data = { name: name, email: email } function processResponse(data, status) { if(status == 'success') { // alert(true) // console.log(data); } else { alert (false) } } $.post(url, data,processResponse); </script> In the debug.php, just create an array contains a post data comming from $.post() function. <?php echo '<pre>'.print_r($_POST, 1).'</pre>'; If you install firebug in firefox(recommend you) and open a console, you can see this result: <pre>Array ( [name] => testajax [email] => jazzman@jazzman.com ) </pre> That means that the data has been successfully sent to the server and returned back to the client (browser). In the processResponse function you can apply styling to the output. This is a very basic principle how ajax works - nothing special.
  13. EDIT: on the top of joint_reg_ajaxversion.php, put it this code and alert(data) echo '<pre>'.print_r($_POST, 1).'</pre>'; exit;
  14. @Andreea115, the basic structure of a post() function is: $.post(url, data, callback). Just make a simple test for me: Replace yours $.ajax() method with next code and tell me what results you get: data = { name: "testajax", email: "testajax@yahoo.com", cat: "E", country_log: 3, honypot: "http://example.com", humancheck: "true" } function processResponse(data, status) { if(status=='success') { alert(true) } else { alert(false) } $.post('cms/views/jobs/joint_reg_ajaxversion.php', data, processResponse) PS. console is a tool from firebug, have you ever heard about firebug?
  15. Could you post a result of the string: // alert(dataStrings) // console.log(dataStrings)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.