AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: barry819 on July 14, 2020, 09:27:11 PM

Title: Not receiving email when message sent
Post by: barry819 on July 14, 2020, 09:27:11 PM
If a customer sends a message through my site, it is not being forwarded to the associated email address. I receive an email notification that a customer has sent a message, but I have to log in to my dashboard in order to read the message. In 1.2.15 I received both, and I have not changed any settings.

is this a bug or is there some new setting that I have to change? I did look, and did not find anything that looked like the right setting to change.

I am receiving other emails, such as notification when an order is placed, or when an item is out of stock. The only type I am not receiving (unless I've missed something) is the messages from customers. This is particularly bad as it makes it a multistep process to reply.
Title: Re: Not receiving email when message sent
Post by: abantecart on July 14, 2020, 09:37:48 PM
What email method do you use? Most likely, it is an issue with your mail service.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 14, 2020, 11:53:25 PM
It's to an outlook address. I don't really think the problem has anything to do with my mail service, since I'm receiving all the other system emails that come from my Abantecart shop. It's only that one type of message, the one that contains the content of a message sent by a customer, that isn't getting sent to the outlook address. As I said, I'm receiving the sales notifications etc at that email. I'm even receiving the emailed notification that a customer sent a message, just not the message itself.

I do have the address set in the Notification settings.

Also, just to be clear, I'm talking about what Abantecart calls a customer "enquiry".
Title: Re: Not receiving email when message sent
Post by: dvagner on July 15, 2020, 01:32:37 AM
Are you talking about contact us form?
Can you provide source code of received email?
Provide screenshots of 'storefront_contact_us_mail' email template with language of your store.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 15, 2020, 07:34:42 PM
Yes, it is the Contact Us form. When a customer sends a message through that form, in 1.2.15 I would receive two emails: one that was a notification telling me that a customer had sent an enquiry, and then a second that would be the text of the enquiry PLUS the email address of the person who sent it, to which I could reply. Since installing 1.2.16, I receive only the email telling me that a customer made an enquiry, but not the text of the enquiry or the customer email.

I am attaching an image of my Contact Us screen. And also a text file of an "Enquiry received" email.

Again, to be clear, Abantecart is capturing the enquiry made through the contact us form, and I can read them by going to my dashboard and then going to messages. The Contact Us form is collecting and storing the Enquiry, but it is not sending the content of those enquiries to my linked email address. But having the enquiries forwarded to my email makes answering them much easier, and a much less time consuming process also, and, to repeat, it did send them in 1.2.15.
Title: Re: Not receiving email when message sent
Post by: dvagner on July 16, 2020, 03:32:41 AM
Please read my previos message.
Check Abantecart logs on errors. I think it was upgrade bug, and you have not email template.
Check email_templates mysql table.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 16, 2020, 10:50:39 AM
OK, Here is what I have in email template. Two screenshots, text file of html_body.txt.

There is an error that I keep getting over and over, which is this:

2020-07-11 6:03:19 - App Warning: AbanteCart core v.1.2.16 Warning: Accessing store with non-configured or unknown domain ( mail.theresamatherfantasyshop.com/dir/ ).
Check setting of your store domain URL in System Settings. Loading default store configuration for now. in /home/shortfor/public_html/TheresaMatherFantasyShop.com/dir/core/lib/config.php on line 228

Hope that gives you what you need to figure out the problem.

Title: Re: Not receiving email when message sent
Post by: dvagner on July 16, 2020, 10:16:12 PM
Can you for test change Mail server and email address for letters from site?
Your default store language English?
Title: Re: Not receiving email when enquiry sent through contact form
Post by: barry819 on July 16, 2020, 11:28:55 PM
Yes, my default store language is English.

I have tried changing the email address and sending a test, that worked exactly the same way and did not forward the text of the message to my email.

I have no idea how to change the email server. There is nothing on any page in settings that asks for an email server, only my domain name & directory. I know how to set the notification email address in the drop down menu that says "Edit notification settings".  If there is some other place where I need to edit a setting I need you to tell me how to find it.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 16, 2020, 11:48:56 PM
OK, I dug around a little more. It appears the one I am not getting is the template titled      storefront_contact_us_mail

It is set to on, as are all the other templates, and I am receiving emails from all the other when appropriate: new order placed, new customer registered, etc.

I am attaching the html.txt of what is in that template. But my guess is that whatever causes that template to send is not working correctly, and it does not send. As I mentioned at the beginning, I get the email that tells me a contact_us message has been made (storefront_contact_us_mail_admin_notify), but not the email that contains the text of the contact message (storefront_contact_us_mail).
Title: Re: Not receiving email when message sent
Post by: dvagner on July 17, 2020, 01:38:24 AM
Can you change php files?
Change
public_html/storefront/controller/pages/content/contact.php on line ~133
before
Code: [Select]
$mail->setTemplate('storefront_contact_us_mail', $this->data['mail_template_data']);add this code:
Code: [Select]
df($this->data['mail_template_data']);and try to send contact us form.

After that, you should see debug.txt in  public_html folder.
this file should contain email, enquirity and name from form.

Also check mailserver logs. It should have error on send messages.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 17, 2020, 02:02:39 AM
I was able to edit the contact.php file as instructed, but it did not fix the problem. I still receive the notification of an enquiry, but not the content of that enquiry.

Thu 7/16/2020 11:50 PM
You have received new enquiry from customer (BARRY, svengali819@yahoo.com)!

This is the final entry in my error log:

2020-07-17 5:37:44 - App Warning: AbanteCart core v.1.2.16 Warning: Accessing store with non-configured or unknown domain ( mail.theresamatherfantasyshop.com/dir/ ).
Check setting of your store domain URL in System Settings. Loading default store configuration for now. in /home/shortfor/public_html/TheresaMatherFantasyShop.com/dir/core/lib/config.php on line 228


This is an excerpt from the edited contact.php file: (lines 124-137)


            $view = new AView($this->registry, 0);
            $view->batchAssign($this->data['mail_template_data']);
            $html_body = $view->fetch($this->data['mail_template']);
            $mail->setTo($this->config->get('store_main_email'));
            $mail->setFrom($this->config->get('store_main_email'));
            $mail->setReplyTo($post_data['email']);
            $mail->setSender($post_data['first_name']);
            df($this->data['mail_template_data']);
            $mail->setTemplate('storefront_contact_us_mail', $this->data['mail_template_data']);
            if (is_file(DIR_RESOURCE.$config_mail_logo)) {
                $mail->addAttachment(DIR_RESOURCE.$config_mail_logo,
                    md5(pathinfo($config_mail_logo, PATHINFO_FILENAME))
                    .'.'.pathinfo($config_mail_logo, PATHINFO_EXTENSION));



I have attached the full edited file.









Title: Re: Not receiving email when message sent
Post by: dvagner on July 17, 2020, 02:06:06 AM
It was not fix. Find debug.txt and attach it to reply in forum.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 17, 2020, 10:05:24 AM
debug.txt file attached

This is the only file named debug.txt that I found in my directories.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 21, 2020, 08:50:55 PM
Any other ideas? I am stumped.
Title: Re: Not receiving email when message sent
Post by: dvagner on July 22, 2020, 05:26:37 AM
Check logs your email server.
Php work correct.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 22, 2020, 11:11:44 AM
There is not a problem with my email server. I receive every other email that I am supposed to receive. I ONLY do not receive the emails that contain the content of Enquirys left via my contact form. I receive the emails telling me someone LEFT an Enquiry, but not  the enquiry itself.  If these was a problem with the email server I would get NO emails from Abantecart.

The problem is in Abantecart, it is not external.

It worked correctly prior to upgrading to 1.2.16, and I have made no changes to my email address or server since then. This is 100% a problem in the "upgrade".
Title: Re: Not receiving email when message sent
Post by: dvagner on July 22, 2020, 12:00:26 PM
If you do want to help us with investigation you have an option to use AbanteCart paid support  http://managed.abantecart.com/
Title: Re: Not receiving email when message sent
Post by: barry819 on July 22, 2020, 12:35:25 PM
I've given you everything you have asked for that you have explained clearly enough for me to find and attach. If there is something else I can submit, tell me what it is and where to find it and I will attach whatever you want.

This problem, however, is one that did not exist in 1.2.15, but started when I upgraded to 1.2.16.

There is something in the programming - I am NOT a programmer - that creates emails and routes them. It is routing all the other emails correctly, but whatever triggers an email when a customer uses the "Contact us" form, is not causing the content of that "Contact us" message to be sent to my connected email. A message is created that tells em a customer has made a contact, but the message content is not forwarded. That WAS being done in 1.2.15, but is not being done in 1.2.16.

I receive both an email that tells me an order has been placed, AND an email that contains the body of the order. So the system is working correctly there, but not for use of the contact form.

This really is such a basic, necessary feature that it should be a HUGE priority for you to get it fixed.
Title: Re: Not receiving email when message sent
Post by: maxter on July 22, 2020, 01:02:05 PM
barry819, if you think it is a bug, you should report this to the AbanteCart team in a github.

https://github.com/abantecart/abantecart-src/issues

I know they resolve issues fast.
Title: Re: Not receiving email when message sent
Post by: barry819 on July 22, 2020, 02:19:02 PM
barry819, if you think it is a bug, you should report this to the AbanteCart team in a github.

https://github.com/abantecart/abantecart-src/issues

I know they resolve issues fast.

Thanks, I will give that a try.
Title: Re: Not receiving email when message sent
Post by: abolabo on July 24, 2020, 07:49:12 AM
all looks like you have some email-server issue,
1. Do you use some  "ms outlook" mail-server (mailer)?
2. Did you tried to set another email address for "contact us" form?
3. Is your receiver email-box  can recieve emails at all?
4. Did you tried to set some another mailer in the settings of AbanteCart (for example gmail etc)?

Unfortunately we have not all configutations to test.
Can you provide credentials via private message to debug yours?
Title: Re: Not receiving email when message sent
Post by: barry819 on July 24, 2020, 11:06:25 AM
I will send you a private message.

1. No, I do not use an Outlook email server. I have emails being sent to  an outlook address. But it is receiving all the other emails FROM my Abantecart store just fine.
2. I have tried setting a different email in my notification settings. That did not help. I also have SMS set in my notifications for enquiries, but never get an SMS to my phone.
3. Yes, I receive order notifications, out of stock notifications, new customer registrations and all other Abantecart notifications at that same email address.
4. I do not have any idea what you mean by that. I am able to set email addresses in the Notifications menu. All are working except Enquiries, with the exact same email address set. Enquiries and New Orders also have SMS set, but I do not receive texts to my phone.
Title: Re: Not receiving email when message sent
Post by: abolabo on July 29, 2020, 08:49:38 AM
1. No, I do not use an Outlook email server. I have emails being sent to  an outlook address. But it is receiving all the other emails FROM my Abantecart store just fine.

No. You have email forwarder to outlook.com server.
This issue is NOT RELATED to AbanteCart Code.
Please ask your hosting provider about email redirects and why it's not works correctly.