WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: ChochkoBG on May 09, 2014, 08:43:28 PM

Title: Not sending E-mail after Successful order
Post by: ChochkoBG on May 09, 2014, 08:43:28 PM
Hello,

I have a problem with the Bakery Shop module.
Everything is working, but when a order is complete the module is not sending a E-mail to the customer even to me also (to the E-mail Address specified in the Bakery Shop Module Configurations).

Also I'm using Mini-Form for my Contact form and there is also a problem.
After completing the form, the module is sending a E-mail only to me, the customer (owner of the message) is not receiving a copy of the message. Anyway in the message i see there is a record "Reply-to:customer@email.com", but the message is not sent to the customer E-mail Address.

I'm using SMTP Configuration settings.
My Web-Page have a different E-mail Address than the Bakery Shop Module.

Thanks!
Title: Re: Not sending E-mail after Successful order
Post by: dbs on May 09, 2014, 10:31:19 PM
Miniform send no message to the visitor.
The visitor see only a success-message/page.
Problems could better be answered in the miniform-thread.

The module mpForm should send emails to the visitor & admin.

Quote
I'm using SMTP Configuration settings.
My Web-Page have a different E-mail Address than the Bakery Shop Module.
What happens with same emailadress like in settings of WB?


Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 09, 2014, 11:37:52 PM
I'm alright with this module ( Mini-Form ).

About the Bakery Shop Module - Nothing. It's the same like normal. The module is not able to send message to the Customer who fill the form and order a product successful.

Even I'm not getting a E-mail when someone finish the order successful.

Thank!
Title: Re: Not sending E-mail after Successful order
Post by: jacobi22 on May 10, 2014, 01:27:30 AM
simple question: have you try PHP-Mail?
Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 10, 2014, 02:04:35 PM
Yes, not sending. Even not working.

PS:

After successful order by a Customer, the module is not sending the E-mail to the Administrator also to the Customer. The integrated E-mail module in the Bakery Shop Module is not working.

As I say, I'm using SMTP Configurations in the Main Settings. When I change the Options to the PHP Mail Method, it's not working (even the Mini-Form module).
Anyway I want to use SMTP Settings.

When I'm using the SMTP Settings, the Module (Mini-Form) is sending the E-mails to the Administrator only.
In the message headers i see the record "Reply-to:user@user.com", but the reply is not sending back to the Customer. This is OK, but only for the Mini-Form Module (it's not necessary in this form - the customer to receive a copy of his own message/question).

After completing a message in the Mini-Form Module, i see the Logs in my E-mail Server and I see that the SMTP Configurations are working and the message is successful.

But when I complete a Order in the Bakery Shop Module, I don't see any connections by the Module to the E-mail Server (in the logs), just nothing.

- By quote of "jacobi22":
I understood that by the "German Laws" there are Laws, about the Sending Messages by unregistered users (I didn't get the point about the unregistered users), but anyway I'm using this is my local network.
Also all of my users are registered, so i think it will not be a problem to send messages.
Also this Law is "only about the Core", but anyway - Bakery Shop and Mini-Form - they are Modules.

Thanks!!!
Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 11, 2014, 09:04:29 AM
bump
Title: Re: Not sending E-mail after Successful order
Post by: instantflorian on May 11, 2014, 12:01:02 PM
hi,

Bakery has its own mailing routine, it never uses SMTP afaik.
So it's merely a PHP /server configuration issue (https://www.google.de/search?q=php+sendmail+doesn't+work) to get PHP mail working.
Maybe you have to put a php.ini file into the root and Bakery module folder with special sendmail settings.

hth
-Florian.


Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 11, 2014, 03:29:17 PM
This method not working. Even after complete settings in the php.ini file.

Another solutions ?

Thanks!!!
Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 13, 2014, 02:28:35 AM
Hello guys,

I used to check all of the PHP Mail Configurations. I read a lot of Guides in Google, but without success.
When i check the option in the WebBaker Settings to use PHP Mail Method, I'm NOT able to use the Contact form (Mini-Form Module).

But when I use the SMTP Settings Configurations, I'm able to use the Contact form (Mini-Form).

The Bakery Shop Module is not sending with the both methods.

I think this is a problem with the .php code in the file (view_summary.php) in the Bakery Shop Module.

Is there any solutions to rewrite (modify) the send method in this file, while using the Mini-Form Module (part of the script - function mail) ?

I need to fix this, because i need to receive E-mails when the Customers finish the Orders.

Thank you very much again!!!
Title: Re: Not sending E-mail after Successful order
Post by: Ruud on May 13, 2014, 10:39:35 AM
Bakery does not use the SMTP method when set in WB.
It can only use the standard PHP mail function.

A good configured host does not have that much problems with php using the mail() function.
Ask your host to make it work.

If you are configuring the host yourself just google how to set SMTP in your php.ini. The correct way depends on the platform used (window/*nix)
Here (http://rajeshstutorials.blogspot.nl/2012/04/how-to-set-up-smtp-server-on-localhost.html) is a nice simple tutorial for Windows/WAMP installations.
The simple php script in the end should work. When it does, Bakery will work fine too.
Title: Re: Not sending E-mail after Successful order
Post by: Ruud on May 13, 2014, 10:44:59 AM
I understood that by the "German Laws" there are Laws, about the Sending Messages by unregistered users (I didn't get the point about the unregistered users), but anyway I'm using this is my local network.
Also all of my users are registered, so i think it will not be a problem to send messages.
Also this Law is "only about the Core", but anyway - Bakery Shop and Mini-Form - they are Modules.

Miniform (made by me) does not send email to the customer for a very practical reason.
Nothing to do with law ( it is not a German product ;) ). I just want my customers to be able to send emails tomorrow too.
A few form submissions with a spam-honeypot-address as customer and my mailserver will be blacklisted by a lot of spamlists.
Sending a "simple" (one step) form to email adresses you cannot control is a serious NO
Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 13, 2014, 11:39:05 AM
Exactly the same settings. I already told you that i tried all kinds of configurations in the php.ini file.
When i choose the PHP Mail Method in the WSB Settings E-mail sending is not working.

Only SMTP Configurations are working and only with Mini-Forum Module.

If the Baker Shop Module is using only PHP Mail Method, I can use SMTP in my Main settings and by default in the Bakery Shop Module it will work with PHP Mail Method.
My PHP Mail Method is working, but not with WSB...

Thanks!!!
Title: Re: Not sending E-mail after Successful order
Post by: jacobi22 on May 13, 2014, 11:30:07 PM
copy my text from the other thread about the same theme

its very simple to change the mail method in bakery from the normal (php-)mail to the WebsiteBaker methode. after this, you can use the mail sending method from the wb-settings, php-mail or smtp-mail

here my changings from a bakery 1.60, i cannot test it with bakery 1.7, but i think, the code is nearly the same. look to the differents between the original code and my changes and search in the bakery-file for the code with the mail-sending

original-code Bakery Vers 1.6
view_confirmation.p hp // ~~ line 177
Code: [Select]
<?php
if (mail($cust_email$cust_email_subject$cust_email_body$cust_email_headers)) {
                                
$email_sent true;
                        }
                        if (
mail($setting_shop_email$shop_email_subject$shop_email_body$shop_email_headers)) {
                                
$email_sent true;
                        }
line 1 - check, if the mail was sending with these method to the customer - if yes - set email_sent to true in line 2

line 4  - check, if the mail was sending with these method to the shop owner - if yes - set email_sent to true in line 5

if email_sent == true, go to the next step, if not, show a error message

this methode  - mail() - use php-mail

changes to wb-methode (possible to change the mail methode in wb-settings - work also with smtp

Code: [Select]
<?php
// Send confirmation e-mail to customer and shop - new Code
                        
if ($wb->mail(SERVER_EMAIL,$cust_email$cust_email_subject$cust_email_body$setting_shop_name$shop_email,$shop_email)){
                                
$email_sent true;
                        }
                        if (
$wb->mail(SERVER_EMAIL,$setting_shop_email$shop_email_subject$shop_email_body$setting_shop_name$shop_email,$shop_email)){
                                
$email_sent true;
                        }

do the same, but with the wb-mail
search for a code like the original in the bakery 1.7 files,  (make a backup from this original file, if something goes wrong), set every line to a comment (maybe with a double Slash at the beginn from every line or  /* at the begin and  */ at the end from this code block, then copy my changes behind the old code in a new row and test it
Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 14, 2014, 07:21:01 AM
This is.

Code: [Select]
// Send confirmation e-mail to customer and shop - new Code
                        if ($wb->mail(SERVER_EMAIL,$cust_email, $cust_email_subject, $cust_email_body, $setting_shop_name, $shop_email,$shop_email)){
                                $email_sent = true;
                        }
                        if ($wb->mail(SERVER_EMAIL,$setting_shop_email, $shop_email_subject, $shop_email_body, $setting_shop_name, $shop_email,$shop_email)){
                                $email_sent = true;
                        }

This was the fix. Now it's sending and everything is working.
When a Order is complete, the Customer and the Administrator - both of them are receiving E-mail.

I want to tell you Thank you very much again. Just a nice team and a nice Open Source products.

Thank you!
Title: Re: Not sending E-mail after Successful order
Post by: jacobi22 on May 14, 2014, 02:08:16 PM
Quote
This is.

cool
thx for replay
Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 14, 2014, 02:29:22 PM
One more question.

Because I'm using Cyrillic for the E-mail Subject and Body and when i edit the message in the files, the message do not read from the file. It always read from the Data Base.

I added manually a file in the folder, but when the message is sending it's not using the file, it's read the Subject and the Body from the Date Base. This is a problem for me, because it's too hard to change all of the Date Base encoding.

Is there a way to change the sending E-mail to read from the folder file, not from the Data Base fields ?

Thanks!!!
Title: Re: Not sending E-mail after Successful order
Post by: jacobi22 on May 14, 2014, 02:56:22 PM
take a look to other postings here and search for utf8_encode / utf8_decode in combination with bakery and try this at first.

see the code from the last post

$wb->mail(SERVER_EMAIL,$cust_email, $cust_email_subject, $cust_email_body, $setting_shop_name, $shop_email,$shop_email)

SERVER_EMAIL ist the replay-adress in the customer mail, comes from the WB-Settings
$cust_email is the customer_mailadress - comes from the customer data formular,
$cust_email_subject - comes from the bakery settings in payment methodes
$cust_email_body - was build in the code line before this mail code start, combination from datas from the payment methode settings && itemlist
$setting_shop_name - comes from the bakery settings
$shop_email - shop mail adress from the bakery settings

every variable was define in the same file (view_confirmation.p hp in vers 1.60)

if you need a new "private" variable, feel free and define it directly in this file

for example ( separat $cust_email_subject)

define
Code: [Select]
$private_cust_email_subject = "My new subject text";
change the code in the mail
Code: [Select]
if ($wb->mail(SERVER_EMAIL,$cust_email, $private_cust_email_subject, $cust_email_body, $setting_shop_name, $shop_email,$shop_email)){
                                $email_sent = true;
                        }

so its work also for the shop_name and in some part from the mail_body (== mail content)

the itemlist is a html-table-code, i think, its not possible and not needed to change a part of this code, maybe the item name








Title: Re: Not sending E-mail after Successful order
Post by: ChochkoBG on May 14, 2014, 05:13:24 PM
Perfect job. Just Germany, no more comments.

Respect "jacobi22" and the rest of the Team.

Thank you very much again!!!
Title: Re: Not sending E-mail after Successful order
Post by: jacobi22 on May 14, 2014, 06:02:57 PM
thx  :wink: