close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UE Embedded image data not sending correctly

Thread began 1/08/2019 5:56 am by Airfox | Last modified 1/08/2019 5:48 pm by Ray Borduin | 22 views | 5 replies |

Airfox

UE Embedded image data not sending correctly

I'm having problems with embedded images in Universal Email. We embed our company logo at the top of our notification emails, shortened example:

<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUg.......... ..........HWR9aRDQEf1/8y8gmUW6JKKK6QAAAABJRU5ErkJggg=='/>

For years its worked fine when using mail_php.php and mailformatting.php. Now we've switched to WA_Email.php its not working correctly, the embedded data gets a url prepended to it:

<img src=3D'https://domain.tld/webassist/email/templates/data:image/=png;base64,iVBORw0KGgoAAAANSUhEUg.......... ..........HWR9aRDQEf1/8y8gmUW6JKKK6QAAAABJRU5ErkJggg=3D=3D='/>

I read a post that said I need to embed the image in the email construction by using:

$Email->AddEmbeddedImage('plugins/images/foxy.png', 'foxy', 'foxy.png', 'base64', 'image/png');

and then call the image in the email template with

<img src=3D\"cid:foxy\">

but this didnt work. I tried with the image in several locations including the same directory as WA_Email.php, and PHPMailer.php, and also describing it from various viewpoints including D:/websites/.... but still nothing. Do you have any suggestions?

Sign in to reply to this post

Airfox

The example img data does not really have the 'plugins/' bit in it. Not sure where that's coming from.

Sign in to reply to this post

Ray BorduinWebAssist

This looks like an issue with the file:

webassist/framework/framework.php

Find this line:

php:
$ignore = '/^(https?%3A%2F%2F|https?:\/\/|mailto:|javascript:|callto:|wtai:|sms:|market:|geopoint:|ymsgr:|msnim:|gtalk:|skype:|sip:|whatsapp:|geo:|tel:|#|\/)/i';



and update it to:

php:
$ignore = '/^(https?%3A%2F%2F|https?:\/\/|mailto:|javascript:|callto:|wtai:|sms:|market:|geopoint:|ymsgr:|msnim:|gtalk:|skype:|sip:|whatsapp:|geo:|data:|tel:|#|\/)/i';



That should prevent it from updating the path and causing this issue.

Sign in to reply to this post

Airfox

Hi Ray,

Thanks for that. Slight technical hitch... I don't have a framework directory or framework.php.
I have just deleted the email from the page and recreated it, just in case something omitted first time, but still nothing.

My page just requires 'WA_Email.php', and WA_Email.php has no mention of requiring framework.php

I cant find anything in the entire site that references framework.php .

Do I need to put in a "require_once" somewhere?

Sign in to reply to this post

Ray BorduinWebAssist

There is a similar line in the webassist/email/WA_Email.php file.

Try updating line 619 from:

php:
$ignore = '/^(https?%3A%2F%2F|https?:\/\/|mailto:|javascript:|#|\/)/i';


to:

php:
$ignore = '/^(https?%3A%2F%2F|https?:\/\/|mailto:|data:|javascript:|#|\/)/i';
Sign in to reply to this post

Airfox

Bingo! That did it.

And in a most unexpected way. Its replaced the embedded

"img src='plugins/data:image/png;base64,iVBORw0KGg....."

with a much shorter

"img src="cid:b709cbe248c945bc6b1....."

The full image data has been added to the end of the file in a nice neat chunk. Its really rather pleasing in an ocd kind of way.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...