WebSite X5Help Center

 
David M.
David M.
User

I Can Not Send Emails From Shopping Cart Or Email Form  en

Author: David M.
Visited 3738, Followers 1, Shared 41  

My hosting company supports php 5 but they said "And you should know that our mail server had been cofigured to require SMTP authentication for any outgoing email in order to prevent mail forgery and spamming activity. Hence you may need to use PEAR to include SMTP authentication on your mail form. "  I have been reading all the posts relating to sending emails from the web form but there  is only suggested PhP customised work around.

I have a good Websitex5 site atwww.completeindulgence.com.au at webhostforasp.net.au but now my client wants to add a webshop.

As I need to setup the email conformation to client and customer from this a webshop and this problem is the only barrier.

Any help would be appreciated

Who is right?

David Merry

Roselands Computer Company

Sydney, Australia

Posted on the
6 ANSWERS
Incomedia
Mirko Nosenzo
Incomedia

I'm sorry but WebSite X5 does not support SMTP authentication. Your hosting provider is using a very restrictive configuration.

Read more
Posted on the from Mirko Nosenzo
Cheeky Man
Cheeky Man
User

Wink

Hi David... I seem to recollect talking to you about this months ago??

Read more
Posted on the from Cheeky Man
David M.
David M.
User
Author

Thanks Cheeky, this is my first post on Answers.websitex5 but it is similar to other problems posted by users.  I just frustrated  that I build a real good static website using v8 and business expanded well. Now, my client wants a simple webshop to support her services provided at her Nails and Beauty shopfront in Sydney.  Either I get a work around on the submit button based on PEAR or I put webshop on another hosting coy that allows web based email using PhP and I pay more fees and another URL etc.

To me just another problem.

David Merry

Roselands Computer Company

Sydney, Australia

Read more
Posted on the from David M.
Cheeky Man
Cheeky Man
User

Wink

David through my own opinion and experience..... I suggest upgrading to V9 (No I'm not on commission ha ha) and move to another hoster who have Apache servers with Linux!!

V9 is now HTML 5 and you would be set up for a few years running this.....

Yours is a windows server and X5 doesn't perform to well on these Microsoft Servers. I am sure I've had dealings with your hosting company before? Ah well it will come to me eventually :-)

Have Fun David!!

www.frankscybercafe.com

Read more
Posted on the from Cheeky Man
David M.
David M.
User
Author

Thanks, Cheeky I take on board your adivice.  I had already updated to V9 and it was v9 I started to develop the webshop.  But thanks I'll investigate other alternatives to hosting my webshop.

Thanks for your interest.

David Merry

Read more
Posted on the from David M.
Ken C.
Ken C.
User

There is a work around, but only really usefull if the cart doesnt sell to many items as it does not send an e-mail to the customer, however the store owner does get ane-mail with all the info.

I had to do this as my hoster no longer permits phpmail

I just changed imemail.inc.php and added a few lines to send via smtp. edit the bits as you need to. The first 7 lines in bold are from the original file so you can see where the new parts go.

Now you will get 2 identical e-mails with the order info as the system tries to send one to your customer and the other to you.  see below if you want to tidy it up after making this change.

            ini_set("sendmail_from", $this->from);
            
            $r = @mail($this->to, $this->subject, $msg, $headers, "-f" . $this->from);
            if(!$r) {
                $headers = "To: " . $this->to . "\r\n" . $headers;
                $r = @mail($this->to, $this->subject, $msg, $headers);
            }
            
include_once("Mail.php");
 
$From = "senders name <senders email>";
$To = "Recipient's name <recipients e-mail address>";
$Subject = "the subject";
$Message = $msg;
 
$Host = "outgoing mail server";
$Username = "username";
$Password = "password";
 
// Do not change bellow
 
$Headers = array ('From' => $From, 'To' => $To, 'Subject' => $Subject);
$SMTP = Mail::factory('smtp', array ('host' => $Host, 'auth' => true,
'username' => $Username, 'password' => $Password));
 
$mail = $SMTP->send($To, $Headers, $Message);
 
if (PEAR::isError($mail)){
echo($mail->getMessage());
} else {
 
}

            return $r;
        }
    }
?>

Ok now you get 2 e-mails with the info, to stop this edit the bottom of imcartsend.php so it looks like this

//Send email to owner
$htmMsg = $htmHead . "<tr><td><b>" . $imOrderNo . "</b></td></tr>" . $htmFoot . "<br>" . $htmHead . $imOrderDataHTML . $htmFoot . "<br>" . $htmHead . $imUserDataHTML . $htmFoot . "<br>" . "";
$oEmail = new imEMail(($imForceSender ? $_POST["imUserMail"] : "***"),"***",$imOrderNo,"iso-8859-1");
$oEmail->setText($imOrderNo . "\n\n" . $imOrderDataTxt . "\n\n\n" . $imUserDataTxt . "\n\n\n");
$oEmail->setHTML("");
$oEmail->send();


@header("Location: ../impayment.html");
?>

Now you get one simple e-mail with the order info and buyers e-mail address, just forward it to the buyer when you deal with the order.

Read more
Posted on the from Ken C.