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. He-he, Tony thank you for sharing the link to Silex I've installed Silex few days ago by Composer and i was very impressed how easy and fast I've done everything on my RedHat server I've noticed that Silex is not a real MVC framework like CakePHP, Symfony,Zend, etc...but....for small projects that is very useful, b/s we don't need to use a full functionality of MVC. It gives me only the C (controller) of the MVC pattern for V (view) I can use a "twig" or a flat php and for M (model) I could use a doctrine ORM, if I want it.
×
×
  • 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.