Post by PhantomMenace » Sun Nov 18, 2018 6:02 am

oc version 3.0.2.0

Im having issues with sending mails, Im pretty sure i have set it up correctly in settings > mail, Cause when i send a single mail to 1 customer to email gets send just fine however it does say that the message as been send successfully to 0 of 0 recipents, (Upper image)

But when i try to send an email to multiple customers via ( Send mail to all customers / Or send mail to all newsletter subscribers ) i get an internal server error 2x (Lower image)

Contact page and email confirmation works fine etc.

If anyone has any idea please let me now

Image

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by OSWorX » Sun Nov 18, 2018 4:56 pm

Enable full error reporting and check then the logfile where you should see what is causing this message.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PhantomMenace » Sun Nov 18, 2018 5:09 pm

OSWorX wrote:
Sun Nov 18, 2018 4:56 pm
Enable full error reporting and check then the logfile where you should see what is causing this message.
error logging is already enabled the error log stays empty after sending the emails and receiving the internall error,

it does show errors when mail is not configured properly ,
when i change to mail protocol instead of smtp i get this

Code: Select all

2018-11-18 9:10:00 - PHP Notice:  Error: Could not load mail adaptor mail! in /public_html/system/library/mail.php on line 36

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by OSWorX » Sun Nov 18, 2018 5:43 pm

Are you using the default mail class?

And enabling full the error reporting is not done only by enabling the error logs in the system settings.
To get all messages, you have to edit the index.php and add:

Code: Select all

error_reporting( E_ALL );
ini_set( 'error_reporting', E_ALL );
ini_set( 'display_errors', 'On' );

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PhantomMenace » Sun Nov 18, 2018 5:48 pm

OSWorX wrote:
Sun Nov 18, 2018 5:43 pm
Are you using the default mail class?

And enabling full the error reporting is not done only by enabling the error logs in the system settings.
To get all messages, you have to edit the index.php and add:

Code: Select all

error_reporting( E_ALL );
ini_set( 'error_reporting', E_ALL );
ini_set( 'display_errors', 'On' );
Yes using default theme and mail

Code: Select all

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<br />
<b>Fatal error</b>: Uncaught Exception: Error: RCPT TO not accepted from server! in /x/x/x/x/public_html/system/library/mail/smtp.php:259
Stack trace:
#0 /x/x/x/x/public_html/system/library/mail.php(142): Mail\Smtp-&gt;send()
#1 /x/x/x/x/public_html/admin/controller/marketing/contact.php(222): Mail-&gt;send()
#2 /x/x/x/x/public_html/vqmod/vqcache/vq2-_home_x_ocartdata_storage_modification_system_engine_action.php(79): ControllerMarketingContact-&gt;send()
#3 /x/x/x/x/public_html/admin/controller/startup/router.php(26): Action-&gt;execute(Object(Registry), Array)
#4 /x/x/x/x/public_html/vqmod/vqcache/vq2-_x_x_ocartdata_storage_modification_system_engine_action.php(79): ControllerStartupRouter-&gt;index()
#5 /x/x/x/x/public_html/system/engine/router.php(67): A in <b>/x/x/public_html/system/library/mail/smtp.php</b> on line <b>259</b><br />

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by OSWorX » Sun Nov 18, 2018 6:24 pm

Seems that the called server does not like the email address you try to send to.
Try to get the email address where this message comes and check if it exist?
Also, check the SMTP settings if all are correct defined.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PhantomMenace » Sun Nov 18, 2018 6:50 pm

OSWorX wrote:
Sun Nov 18, 2018 6:24 pm
Seems that the called server does not like the email address you try to send to.
Try to get the email address where this message comes and check if it exist?
Also, check the SMTP settings if all are correct defined.
I think that that error then is not related to the internal server error then,

Cause i always do get Mail delivery failed: returning message to sender for a couple of email adresses, but it never stoped at the start of the sending process it will just send out all the mails and for the mails that are not valid not anymore it will do a return to sender,

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by PhantomMenace » Sun Nov 18, 2018 7:59 pm

im using another email adress and its working now,

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by OSWorX » Sun Nov 18, 2018 8:48 pm

PhantomMenace wrote:
Sun Nov 18, 2018 7:59 pm
im using another email adress and its working now,
The OpenCart mail class is unfortunetely not really helpful in cases if vaulty email addresses.
I have made for myself and some of my customers a simple extension which checks all stored email addresses for validity (does server exist, is reachable, is spam. etc.).
Can be called manual or by cron job periodically.
Does also check whenever a customer wants to submit an email address (shop, contact, etc.).

With this extension I (and my customers) never do have vaulty email addresses in their database.
Something like this could be also for you (extension yet not published, but can be done within minutes).

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PhantomMenace » Sun Nov 18, 2018 10:36 pm

OSWorX wrote:
Sun Nov 18, 2018 8:48 pm
PhantomMenace wrote:
Sun Nov 18, 2018 7:59 pm
im using another email adress and its working now,
The OpenCart mail class is unfortunetely not really helpful in cases if vaulty email addresses.
I have made for myself and some of my customers a simple extension which checks all stored email addresses for validity (does server exist, is reachable, is spam. etc.).
Can be called manual or by cron job periodically.
Does also check whenever a customer wants to submit an email address (shop, contact, etc.).

With this extension I (and my customers) never do have vaulty email addresses in their database.
Something like this could be also for you (extension yet not published, but can be done within minutes).
It seems im still getting the double internal error when choosing send to all news letters subscribersm
Its able to send the mails if i choose send to all customers but after a while it gets stuck and it throws an error again,

You saying its cause the customers emails that are not valid anymore that it will stop?

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by OSWorX » Sun Nov 18, 2018 11:22 pm

The mail class stops sending when an error occurs - that's how it works.
You could see if you can check the stored emails with a tool (internal or external).
Or editing the mail class and rework that part to be able to send valid emails (and log invalide).

Using the php-mail should work instead, because when SMTP is used, only then these messages will be displayed.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PhantomMenace » Mon Nov 19, 2018 12:55 am

OSWorX wrote:
Sun Nov 18, 2018 11:22 pm
The mail class stops sending when an error occurs - that's how it works.
You could see if you can check the stored emails with a tool (internal or external).
Or editing the mail class and rework that part to be able to send valid emails (and log invalide).

Using the php-mail should work instead, because when SMTP is used, only then these messages will be displayed.


How can i make the mail class just to ignore invalid emails and keep sending them until done?
and also supress error pop ups

New member

Posts

Joined
Wed Dec 30, 2015 6:03 am

Post by OSWorX » Mon Nov 19, 2018 2:21 am

PhantomMenace wrote:
Mon Nov 19, 2018 12:55 am
How can i make the mail class just to ignore invalid emails and keep sending them until done?
and also supress error pop ups
I would prefer to check the emails before sending out any message.
Because that is an easier task than editing the mail class to check during the action and supress (or log) the vaulty addresses.

But maybe another user have a better idea?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 113 guests