Post by cobbman » Wed May 30, 2012 12:03 pm

When I go to send an email to "All Customers" it says "Your message has been successfully sent to 0 of 72 recipetants!" (yes recipients is misspelled too). It basically does not send emails to any customers! However, it WILL work if I send an email individually.

We send emails of coupons to our customers regularly, and this started doing this after upgrading to 1.5.2.1. I was hoping that 1.5.3.1 would fix it but it still seems to be an issue.

If you need any additional information please let me know. My email settings are all the default email settings (a.k.a. the "mail" option is selected).

Thank you

Newbie

Posts

Joined
Wed Jul 27, 2011 11:01 am

Post by teratyke » Fri Jul 13, 2012 7:52 pm

I have almost exactly the same issue. I've not tested the All Customers group for fear of being lynched.

I can send messages individually, but if I choose the All Newsletter Subscribers group I see..
Your message has been successfully sent to 0 of 254 recipetants!
I love everything about that error message, talk about positive spin, only a politician could see 0 of 254 as a success... :D

My problem install has been upgraded from 1.5.x to 1.5.3.1 the mass email feature has never worked so far as I can tell. I don't think I have any mods that are applying to this part of the system, but not really sure where to look.

I installed a fresh, test version of opencart on another server and the feature works. So its either my config, something I've done, or the fact that its an upgrade rather than a fresh install.

Did you resolve this? Any suggestions anyone? Help?!

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by cobbman » Sat Jul 14, 2012 10:05 am

LOL, the message IS pretty hilarious!

The problem started for me after upgrading to 1.5.2.1 and has persisted since. It might be a mod, but the only customizations I've made have been cosmetic (views). I really don't know enough to delve into the controllers and sort out the email config's.

I checked with my host, and they said that some of the emails are going through but some aren't. As if it's sporadic. I checked to make sure there wasn't an issue with my host thinking I was spamming. They said everything checked out fine.

The closest I've been able to come on knowing what to do, is checking my error logs. So far this one comes up a lot:
/system/library/mail.php on line 153

Do your error logs show the same?

Newbie

Posts

Joined
Wed Jul 27, 2011 11:01 am

Post by teratyke » Sat Jul 14, 2012 2:32 pm

I don't have any error logs that relate to this either in Opencart or on the server. :(

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by RichMo » Tue Jul 31, 2012 4:54 pm

Any progress on this? I'm having the same issue.

New member

Posts

Joined
Tue Jul 10, 2012 5:54 pm

Post by teratyke » Tue Jul 31, 2012 5:18 pm

Sorry, no progress at all.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by Daniel » Tue Jul 31, 2012 7:47 pm

look at the svn.

it works. probably you have an error sending mails.

check your php error logs

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by RichMo » Tue Jul 31, 2012 9:20 pm

Thanks, but what is "svn", and how do I check PHP error logs?

New member

Posts

Joined
Tue Jul 10, 2012 5:54 pm

Post by teratyke » Tue Jul 31, 2012 9:40 pm

SVN = Subversion, or small releases since your install of 1.5.3.1. there is a link in the download tab.
PHP error logs - check with your host.

I can't find an error that relates to this in my error logs.
I did a fresh install on another server of the same version of OC and it does work, so I don't think this is a bug as such.

However I need to fix in my live store. Seems to me it must be something to do with..

a) the fact that my store is an upgrade from an older version (upgraded from 1.5 with each major OC ease),
or
b) its something I have done with some mod - I don't think I have any mods effecting this part of opencart but..

The store sends out emails no problem, but not to the all newsletter subscribers group. Where to look?

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by ielektros » Thu Aug 02, 2012 9:30 pm

Some news? I have the same... but other result. 30 of 150 sended.... :-\

Arduino shop
http://iElektros.de
the microcontroller solution


User avatar
Newbie

Posts

Joined
Tue Jan 31, 2012 4:01 am

Post by Daniel » Fri Aug 03, 2012 2:13 am

ok try installing the latest version of opencart under a separate folder and set up some fake accounts.

every time i have to check something like this it always turns out to the be the users host.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by teratyke » Fri Aug 03, 2012 4:07 am

I tried that all ready and it worked, so it would seem its not a bug, but its still a problem for me. I just created about 300 customers and a test message was sent no problems - on my test install that is.

I noticed though that it starts with 0 of 300 successfully sent then it counts up in 10's - when complete the message changes to say they have all been sent (pretty neat that).

So when my store said 0 of 277 successfully sent - which I presumed was an error, it would seem that its actually not started to send yet. Stuck before even 1 message has gone.

I checked the error console whilst trying to send the mail - I think I might have found something...
It seems to be redirecting the second page to http rather than https. See here...
Capture1.JPG

Capture1.JPG (50.82 KiB) Viewed 9049 times

I don't get that in my fresh install - which doesn't have https configured. That is the only difference I can find.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by RichMo » Tue Aug 07, 2012 2:37 pm

I check my mail logs, and it seems to show as if 10 emails (all beginning with "a") got sent, but that is all. There are over 1500 that should send.

Why would it send 10 then tell me 0 of 1500 were sent? Below is an extract from the log...

2012-08-06 18:26:14 uXXXXXXXX 4AKI1X-1TBXAk1rd6-00LzzM |< REMOTE=XXX.XXX.XXX.XXX SCRIPT=/Example/public_html/shop/admin/index.php -- /usr/sbin/sendmail -t -i
2012-08-06 18:26:14 uXXXXXXXX 4AKI1X-1TBXAk1rd6-00LzzM <= S=Sales@Example.com SZ=5028 D=0 SID=140006505
2012-08-06 18:26:14 uXXXXXXXX 4AKI1X-1TBXAk1rd6-00LzzM => aaron@mycustomer.com msmtp.kundenserver.de[XXX.XXX.XXX.XXX] 250 Message 0Lt8oh-1TulPJ29r1-012sRD accepted by mreu4.kundenserver.de

New member

Posts

Joined
Tue Jul 10, 2012 5:54 pm

Post by teratyke » Tue Aug 07, 2012 5:38 pm

I just disabled ssl in the admin (by changing the admin/config.php paths to http rather than https).
I resent my message to the all newsletter subscribers group and it worked. It has never worked before now.

So there is certainly a problem with [my configuration?] when sending to the group using https to access the admin. Can anyone else try the same change to see if it fixes the problem for them?


EDIT:
Actually it didn't quite work it only sent 190 of 272 messages and then I got this in the log..
2012-08-07 10:29:16 - PHP Notice: Error: E-Mail to required! in /home/sites/mysite.co.uk/public_html/system/library/mail.php on line 51
- I fixed this -somehow I had a user account in the db with no email address - I guess that caused the mail function to crash after 190 or so recipients.



So any idea why this works when I access the admin as http but not https?

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by RichMo » Tue Aug 07, 2012 5:57 pm

Interesting.. I just disabled https in the same way and now It seems to be sending. It seemed to be stuck on 290 for a few mins then picked up again. Then stuck again at 590... I will leave the window open for a while and see if it will get to the end.

New member

Posts

Joined
Tue Jul 10, 2012 5:54 pm

Post by teratyke » Tue Aug 07, 2012 6:02 pm

RichMo wrote:Interesting.. I just disabled https in the same way and now It seems to be sending. It seemed to be stuck on 290 for a few mins then picked up again. Then stuck again at 590... I will leave the window open for a while and see if it will get to the end.
Mine stuck too, but I'm sure it was because of the missing email address. Unfortunately you can't re-send to the failed ones.

Can you check your error log, or use phpmyadmin to select all the newsletter subscribers and then sort the table alphabetically by email address, any empty one's should be at the top of the list?

Thanks for confirming, at least its not just me.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by RichMo » Tue Aug 07, 2012 6:20 pm

Well it finished sending all the messages. YAY!

Anyone kno why it might not be working with SSL enabled? My server host settings?

I have no entries in my database without an email, and none of mine are currently subscribed because when I copied over my database from my old Cubecart shop this but didn't transfer correctly.

If you have email fields in your db that are empty, run an SQL command to fill them with your own email address, then try sending all again.

New member

Posts

Joined
Tue Jul 10, 2012 5:54 pm

Post by teratyke » Tue Aug 07, 2012 6:57 pm

I fixed the missing email errors - can't resend though without the risk of upsetting the first 190 customers.

In terms of the HTTPS problem.
I've been looking through the code, but it uses JavaScript to send each 'page' of messages and json to encode. I can't follow the process because I don't really understand JavaScript or json, but I guess the URL being generated for each page is http, not https. So when you send it from the https admin its being seen as a redirect (to http) and failing.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by ADD Creative » Wed Aug 08, 2012 8:07 pm

I think in admin\controller\sale\contact.php

changing

Code: Select all

						$json['next'] = str_replace('&', '&', $this->url->link('sale/contact/send', 'token=' . $this->session->data['token'] . '&page=' . ($page + 1)));
to

Code: Select all

						$json['next'] = str_replace('&', '&', $this->url->link('sale/contact/send', 'token=' . $this->session->data['token'] . '&page=' . ($page + 1), 'SSL'));
might fix it.

Can anyone test and I will do a Git pull request.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by teratyke » Wed Aug 08, 2012 8:43 pm

ADD Creative wrote:I think in admin\controller\sale\contact.php

changing

Code: Select all

						$json['next'] = str_replace('&', '&', $this->url->link('sale/contact/send', 'token=' . $this->session->data['token'] . '&page=' . ($page + 1)));
to

Code: Select all

						$json['next'] = str_replace('&', '&', $this->url->link('sale/contact/send', 'token=' . $this->session->data['token'] . '&page=' . ($page + 1), 'SSL'));
might fix it.

Can anyone test and I will do a Git pull request.
Thanks for this. It looks good - I went all through that file, but I didn't know what was missing, even tried to find the corresponding code in the front and to spot the difference.
I can't test unfortunately at the moment, It makes my customers mad if they get too many emails. Should be able to test in the next week or so though.
Thanks, again!

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm
Who is online

Users browsing this forum: Semrush [Bot] and 5 guests