Page 3 of 3

Re: OC 3.0.2.0 Email issues

Posted: Wed Mar 28, 2018 1:32 am
by opensab677
For Straighlight
you on 6th january wrote
In admin - > extensions - > events page, ensure to see more than 1 event listed. If not, you need to truncate the event table in your Opencart database and to re-insert the values from your install/opencart.sql file located in the downloaded OC Zip file provided by opencart.com .

I don't understand how to do this operation. Explain me better.
I can't receive email on additional mailbox and my situation in dashboard is as here http://prntscr.com/ix5roq
thanks

Re: OC 3.0.2.0 Email issues

Posted: Wed Mar 28, 2018 1:42 am
by straightlight
A simplified explanation has been posted here: viewtopic.php?f=202&t=202500&p=715912#p715912

Re: OC 3.0.2.0 Email issues

Posted: Mon Apr 02, 2018 4:01 pm
by opensab677
I continue not to receive email to additional mailbox

Re: OC 3.0.2.0 Email issues

Posted: Mon Apr 02, 2018 6:55 pm
by straightlight
Have you cleared all OC cache from the OC admin? viewtopic.php?f=176&p=718325#p718325

Re: OC 3.0.2.0 Email issues

Posted: Mon Apr 23, 2018 9:35 am
by Ben23
Thanks so much to luke213 for solving this problem. I was running out of hair to pull out!

Re: OC 3.0.2.0 Email issues

Posted: Wed Apr 25, 2018 10:21 am
by SGT
Much appreciate the effort you put into this luke213, thank you. :)

I did this slightly differently, I noticed that I already had two entries in the "events" table, they were to do with hiding ex-tax prices, so I wanted to keep those. So rather than drop the table I just added the records, but first I removed the index values (1-33) as I already had reccords 1 & 2. The index field is auto increment so I just removed that field from the SQL file. This is the file that I imported (based on luke213's file):

Code: Select all

INSERT INTO `event` (`code`, `trigger`, `action`, `status`, `sort_order`) VALUES
('activity_customer_add', 'catalog/model/account/customer/addCustomer/after', 'event/activity/addCustomer', 1, 0),
('activity_customer_edit', 'catalog/model/account/customer/editCustomer/after', 'event/activity/editCustomer', 1, 0),
('activity_customer_password', 'catalog/model/account/customer/editPassword/after', 'event/activity/editPassword', 1, 0),
('activity_customer_forgotten', 'catalog/model/account/customer/editCode/after', 'event/activity/forgotten', 1, 0),
('activity_transaction', 'catalog/model/account/customer/addTransaction/after', 'event/activity/addTransaction', 1, 0),
('activity_customer_login', 'catalog/model/account/customer/deleteLoginAttempts/after', 'event/activity/login', 1, 0),
('activity_address_add', 'catalog/model/account/address/addAddress/after', 'event/activity/addAddress', 1, 0),
('activity_address_edit', 'catalog/model/account/address/editAddress/after', 'event/activity/editAddress', 1, 0),
('activity_address_delete', 'catalog/model/account/address/deleteAddress/after', 'event/activity/deleteAddress', 1, 0),
('activity_affiliate_add', 'catalog/model/account/customer/addAffiliate/after', 'event/activity/addAffiliate', 1, 0),
('activity_affiliate_edit', 'catalog/model/account/customer/editAffiliate/after', 'event/activity/editAffiliate', 1, 0),
('activity_order_add', 'catalog/model/checkout/order/addOrderHistory/before', 'event/activity/addOrderHistory', 1, 0),
('activity_return_add', 'catalog/model/account/return/addReturn/after', 'event/activity/addReturn', 1, 0),
('mail_transaction', 'catalog/model/account/customer/addTransaction/after', 'mail/transaction', 1, 0),
('mail_forgotten', 'catalog/model/account/customer/editCode/after', 'mail/forgotten', 1, 0),
('mail_customer_add', 'catalog/model/account/customer/addCustomer/after', 'mail/register', 1, 0),
('mail_customer_alert', 'catalog/model/account/customer/addCustomer/after', 'mail/register/alert', 1, 0),
('mail_affiliate_add', 'catalog/model/account/customer/addAffiliate/after', 'mail/affiliate', 1, 0),
('mail_affiliate_alert', 'catalog/model/account/customer/addAffiliate/after', 'mail/affiliate/alert', 1, 0),
('mail_voucher', 'catalog/model/checkout/order/addOrderHistory/after', 'extension/total/voucher/send', 1, 0),
('mail_order_add', 'catalog/model/checkout/order/addOrderHistory/before', 'mail/order', 1, 0),
('mail_order_alert', 'catalog/model/checkout/order/addOrderHistory/before', 'mail/order/alert', 1, 0),
('statistics_review_add', 'catalog/model/catalog/review/addReview/after', 'event/statistics/addReview', 1, 0),
('statistics_return_add', 'catalog/model/account/return/addReturn/after', 'event/statistics/addReturn', 1, 0),
('statistics_order_history', 'catalog/model/checkout/order/addOrderHistory/after', 'event/statistics/addOrderHistory', 1, 0),
('admin_mail_affiliate_approve', 'admin/model/customer/customer_approval/approveAffiliate/after', 'mail/affiliate/approve', 1, 0),
('admin_mail_affiliate_deny', 'admin/model/customer/customer_approval/denyAffiliate/after', 'mail/affiliate/deny', 1, 0),
('admin_mail_customer_approve', 'admin/model/customer/customer_approval/approveCustomer/after', 'mail/customer/approve', 1, 0),
('admin_mail_customer_deny', 'admin/model/customer/customer_approval/denyCustomer/after', 'mail/customer/deny', 1, 0),
('admin_mail_reward', 'admin/model/customer/customer/addReward/after', 'mail/reward', 1, 0),
('admin_mail_transaction', 'admin/model/customer/customer/addTransaction/after', 'mail/transaction', 1, 0),
('admin_mail_return', 'admin/model/sale/return/addReturn/after', 'mail/return', 1, 0),
('admin_mail_forgotten', 'admin/model/user/user/editCode/after', 'mail/forgotten', 1, 0);
To use save this as say 'fixemail.sql' (you may need to change 'event' to 'oc_event' as explained previously in this thread). I used mysql console but I assume you could also use PHPMyAdmin. The linux console command would be similar to:

# mysql -u {username} -p {databasename} < fixemail.sql

This imports the required records without dropping the table and potentially removing existing entries.

Re: OC 3.0.2.0 Email issues

Posted: Sun Jul 01, 2018 4:02 am
by JenniferM23H
luke213 wrote:
Mon Aug 07, 2017 1:11 am
Thanks;) I'm not sure how wide spread this will be with upgrades, I honestly don't have another database on hand that is working to test the upgrade on, nor do I have the time to keep fiddling now that it's working;) I already lost way too many hours this week to finding this issue and fixing it. But I suspect it's either on all upgraded stores(wish I'd have noticed that "event" section earlier), or it's something that was carried over of sorts with my ancient database.
THANK YOU! I recently updated from 1.5 (something) to 3.0.2.0. We tried everything to get email to work. When someone would order I didn't get an email notification and neither did the customer. I tried too many things to keep track of trying to get it to work (working with Template Monster and OpenCart itself). Nothing worked! I searched the forums and tried everything I came across and nothing suggested work. We did what you suggested here and now things are working again! I'm getting email notifications and my customers are too. Thank you so much for the time you put into solving this problem and for taking the time to post it here. I'd still be having problems if it weren't for this post. Jennifer

Re: OC 3.0.2.0 Email issues

Posted: Thu Jul 12, 2018 6:59 pm
by akshay.bramhane
Hi All,

I also faced this issue and finally after wasting lot of time in debugging it ended up being a problem with the hosting company.
So I am using Opencart 3.0.2 and am using SMTP protocol. There is nothing wrong with SMTP.
Mail Engine - SMTP
Mail Parameter - Not required
SMTP Host : ssl://smpt.gmail.com (for gsuite and gmail)
SMTP username : your email
SMTP Password : your password
SMTP Port : 465
Timeout : 300

The catch here is with this setting you may get the FsockOpen Failure errors for SMTP, this is because the SMTP Port : 465 is not opened for you by your Hosting Company. Just ensure that you contact them and ask them to open this port for you.

Additionally, set and confirm your SPF and SKIM settings properly.

This worked for me for all possible mails including contact forms, mail communications, order notifications, etc.

Note : My Host Provider is Namecheap

Hope this helps!

Re: OC 3.0.2.0 Email issues

Posted: Thu Jul 12, 2018 9:13 pm
by straightlight
SMTP Host : ssl://smpt.gmail.com (for gsuite and gmail)
I fail to see how this parameter has worked for you.

Re: OC 3.0.2.0 Email issues

Posted: Sat Jul 21, 2018 4:26 am
by jfn99
Wow, this saved my day... after 4 hours searching this fixed it for me.
Anyone upgrading OC 2 to OC 3 will probably need this.
thanks a lot for this post!

Re: OC 3.0.2.0 Email issues

Posted: Thu Dec 13, 2018 12:45 am
by martinjones
luke213 wrote:
Sun Aug 06, 2017 8:10 am
Well I SOLVED THIS PROBLEM:)
So what it ended up being was the "event" section/table in the database. I never noticed it before today, I had finally merged a new and old database manually and pulled the info I needed and left everything else behind. Well afterwards I was patching up things that weren't enabled or needed to be fixed like taxes etc. Since I pulled only the necessary info for my customers, orders and products. Well as I was doing that I noticed the "event" section in the admin, and comparing to my existing installation I realized there were a bunch of notifications called from in there. So I exported that database from the working install pushed it into my primary database and low and behold it works like it should. ...
Superb - thank you - I had precisely this problem and your solution fixed it for me. My upgrade was from 1.5.1 to 3.0.20.
Martin

Re: OC 3.0.2.0 Email issues

Posted: Fri Oct 18, 2019 10:25 pm
by duartemv
luke213 wrote:
Sun Aug 06, 2017 8:10 am
Well I SOLVED THIS PROBLEM:)
Yes you did!!!! :) :) :) AMAZING detective work!!!!

After importing the eventpatch I had to rename the new created "event" table to add a prefix to match the old one, and after that it is working just as it should!!!