We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Fix CartThrob Email Notification Links and IMG src URLs Broken

How Do I?

stereoi123's avatar
stereoi123
35 posts
4 months ago
stereoi123's avatar stereoi123

I am experiencing an issue with CartThrob notifications. When they are sent in HTML mode, links and linked images (images in <img> tags) appear to get corrupted. - Characters are switched out and, often, spaces are added to urls.

When I send the same notification in plain text format, links (urls) appear just fine.

Using: CartThrob 7.1.0 ExpressionEngine 7.5.13 PHP 8.0 (I had been using PHP 8.2 when this issue first began)Your help is much appreciated!

-JP

       
mithra62's avatar
mithra62
63 posts
4 months ago
mithra62's avatar mithra62

I’d take a look at your email service. VERY odd that emails would suddenly become corrupted from a legacy system. Did you move hosts or move ot a different email provider recently?

       
Tom Jaeger's avatar
Tom Jaeger
451 posts
4 months ago
Tom Jaeger's avatar Tom Jaeger

Had the same thought… seems odd..

Did you just jump up to PHP 8.2? I’m not sure CartThrob 7.1 supports PHP 8.2….

? 1
       
stereoi123's avatar
stereoi123
35 posts
4 months ago
stereoi123's avatar stereoi123

I am self-replying to this per the recommendation of Jelle D. on the Slack channel:

The cause of the issue was that in EE’s Outgoing Email Settings I had changed the new line character to \r\n from \n. I switched that back to \n and email notifications are working great now.

In my Slack question I mentioned that I had also changed the SMTP port and Encryption to the STARTTLS port and switching that pack to the SSL port got the notifications working again. However, in further testing, I can have the encryption set to STARTTLS and things are working fine as long as the New Line Character is \n.

? 2
       
mithra62's avatar
mithra62
63 posts
4 months ago
mithra62's avatar mithra62

Yeah, new line stuff with email is very much dependent on the service. Some like \n others \n\r but none accept all. Rarely a reason to change an existing setting that was working. Glad you figured it out!

? 2
       
stereoi123's avatar
stereoi123
35 posts
4 months ago
stereoi123's avatar stereoi123

Thanks Tom and mithra62!

RE: CartThrob 7.1 supporting PHP 8.2 - It may not, but is working 😉 the docs say CT supports PHP 7.1+. It throws some Depricated errors, but seems to work well for our stage of development.

For this project we have to generate & email a lot of QR codes - selling tickets. The old EE QR Code Add-On does not appear to be EE 7 compatible, so I’m using Chillerlan php-qrcode to generate the codes. Chillerlan’s QR Code plugin does not appear to work well with PHP < 8..

The project is for a nonprofit so between a tight budget and hearing chatter of CT being integrated in to EE in the future, we’re holding off on purchasing CT 8.

I love EE for eCommerce, so I’m super excited for both ExpresoStore (I haven’t used yet) and CartThrob being brought under PacketTide!

? 1
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.