Post by thewanderer » Mon Dec 14, 2009 8:02 pm

I am having problems with the email on two domains both stores are not sending emails, even though i get the message sent verification, i am not getting email.
I have tested email on the server with this script and it works fine, so why is the store not sending?

Code: Select all

<?php
 if (! empty($_POST['email']) )
 {

  $message=$_POST["message"];
  $email=$_POST["email"];
  $fname=$_POST["fname"];
  $sname=$_POST["sname"];
  $fromadd=$_POST["fromadd"];

  $content = "You have a New Message From {$fname} {$sname}: 
 {$message}";

  ini_set("sendmail_from" , $fromadd);
  $mailSent = false;
  $mailSent = mail( $email, "Website Test Contact Form", $content, "From: 
 $fromadd", "-f".$fromadd );

  if ($mailSent)
  {
    echo 'Mail sent';
  }
  else
  {
    echo 'Problem';
  }
 }
 else
 {

 ?>
 <html>
 <head>
 <title>SendMail Test - </title>
 </head>
 <body bgcolor="white">
 <font face="Verdana" size="-9">
 <p> The From address <b>MUST</b> be Fasthost Based </p> <FORM 
 method="post" action="<? echo $_SERVER['PHP_SELF']; ?>"> <b>From 
 Address: </b><br><INPUT name="fromadd" type="text"><br> <b>First Name: 
 </b><br><INPUT name="fname" type="text"><br>
 <b>Surname: </b><br><INPUT name="sname" type="text"><br> <br> <b>Email 
 Address (To): </b><br><INPUT name="email" type="text"><br> <br> <br> 
 <b>Your Message:</b><br> <TEXTAREA name="message"> </textarea><br> 
 <input type=submit> </FORM>

 </body>
 </head>
 </html>
 <?
 }
 ?>
I have tried changing settings from mail to SMTP but it makes no difference.
Any clues anyone please...

New member

Posts

Joined
Fri Dec 04, 2009 7:07 am

Post by thewanderer » Mon Dec 14, 2009 10:26 pm

Finally found the error i think; from error log
2009-12-14 13:56:39 - PHP Notice: fputs() [<a href='function.fputs'>function.fputs</a>]: send of 6 bytes failed with errno=32 Broken pipe in /*/*/*/*/*/*/system/library/mail.php on line 351

Can anyone help please.

Thanks in advance.

New member

Posts

Joined
Fri Dec 04, 2009 7:07 am

Post by readyman » Mon Dec 14, 2009 11:14 pm

Have you asked your host about this error? They may have some security restrictions on sendmail. SMTP should work as long as you have the correct access details setup.

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by thewanderer » Mon Dec 14, 2009 11:31 pm

Hi
Thanks for the reply.
I have spoken to the hosting co and they told me to test their mail script which worked fine and will not say anything else as they insist it must be a coding error, but i have not touched anything related to the mail.

New member

Posts

Joined
Fri Dec 04, 2009 7:07 am

Post by thewanderer » Tue Dec 15, 2009 6:38 am

Can somebody please give me a clue here, everything worked ok last week, no changes made to script.
Latest error log:

Mon Dec 14 22:33:46 2009] [error] [client ] FastCGI: server "/var/www/fcgi/php-cgi" stderr: Error: MAIL FROM not accepted from server!
[Mon Dec 14 22:33:46 2009] [error] [client ] FastCGI: server "/var/www/fcgi/php-cgi" stderr: Error: RCPT TO not accepted from server!
[Mon Dec 14 22:33:46 2009] [error] [client ] FastCGI: server "/var/www/fcgi/php-cgi" stderr: Error: DATA not accepted from server!
[Mon Dec 14 22:33:46 2009] [error] [client ] FastCGI: server "/var/www/fcgi/php-cgi" stderr: Error: DATA not accepted from server!

??? ???

New member

Posts

Joined
Fri Dec 04, 2009 7:07 am

Post by thewanderer » Tue Dec 15, 2009 8:02 am

Fixed it. :) :) :) :)

New member

Posts

Joined
Fri Dec 04, 2009 7:07 am

Post by i2Paq » Tue Dec 15, 2009 5:15 pm

thewanderer wrote:Fixed it. :) :) :) :)
Please share your solution. :)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Daniel » Tue Dec 15, 2009 6:07 pm

you shoukd not be using fputs if you are using the mail function!

you have got it set to SMTP when your host is telling you to use the built in php mail function. which is what i recommend people to use.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by jose3001 » Sun Jan 03, 2010 2:44 am

I have the same problem i think, the opencart dont send any emails. When i try to recover password, it says an email has been sent but i dont receive it.

What could be the problem/solution?

Thanks!

Newbie

Posts

Joined
Sun Jan 03, 2010 2:42 am
Who is online

Users browsing this forum: No registered users and 75 guests