Post by matthewcoatney » Tue Oct 10, 2017 5:23 am

I've connected OpenCart 3 with the Square payment extension. Payments come through Square just fine.

But I get an error when OpenCart tries to send an email. My host says I've got all the email params correct but I am getting this error when I click Confirm Order:

SyntaxError: JSON.parse Error: Invalid character at position:1

Firebug tells me this:

<b>Warning</b>: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in <b>/home4/cmatthewc/public_html/system/library/mail/smtp.php</b> on line <b>87</b><b>Warning</b>: fsockopen(): unable to connect to anewcreationgreetings.com :465 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in <b>/home4/cmatthewc/public_html/system/library/mail/smtp.php</b> on line <b>87</b><br />
<b>Fatal error</b>: Uncaught exception 'Exception' with message 'Error: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)' in /home4/cmatthewc/public_html/system/library/mail/smtp.php:90
Stack trace:
#0 /home4/cmatthewc/public_html/system/library/mail.php(142): Mail\Smtp-&gt;send()
#1 /home4/cmatthewc/public_html/catalog/controller/mail/order.php(275): Mail-&gt;send()
#2 /home4/cmatthewc/public_html/catalog/controller/mail/order.php(34): ControllerMailOrder-&gt;add(Array, '7', 'The card transa...', true)
#3 [internal function]: ControllerMailOrder-&gt;index('checkout/order/...', Array)
#4 /home4/cmatthewc/public_html/system/engine/action.php(79): call_user_func_array(Array, Array)
#5 /home4/cmatthewc/public_html/system/engine/event.php(62): Action-&gt;execute(Object(Registry), Array)
#6 /home4/cmatthewc/public_html/system/engine/loader.php(229): Event-&gt;trigger('model/checkout/...', Array)
#7 [internal function]: Loader-&gt;{closure}(Array, Array)
#8 /home4/cmatthewc/public_html/system/engine/proxy.php(47): call_user_func in <b>/home4/cmatthewc/public_html/system/library/mail/smtp.php</b> on line <b>90</b><br />

Please Advise, how can I resolve this or what should I look into next?


Posts

Joined
Wed Sep 13, 2017 7:31 am

Post by PWF » Sun Oct 15, 2017 5:32 pm

Hi matthewcoatney,

Just passing and saw there was no replies. I don't have this extension installed but have a couple of thoughts.

1. Has email ever worked?
2. Is port 465 open? I know that my provider (GCP) shuts this down.
3. Double check there isn't a space after your email address. The reason I say this is there looks to be a space between your address and port number:-

fsockopen(): unable to connect to anewcreationgreetings.com :465 (php_network_getaddresses: getaddrinfo failed: Name or service not known)

Let me know how how you get on.

PWF
Newbie

Posts

Joined
Wed Jun 04, 2014 5:14 am
Who is online

Users browsing this forum: No registered users and 18 guests