First off, my set up is:
Debian 9
Package contents
Apache 2.4.33
MySQL 5.7.22
OpenSSL 1.0.2o
PHP 7.0.30
phpMyAdmin 4.8.1
SQLite 3.18.0
SuiteCRM 7.10.7
I am testing email campaigns. When I add an image to the email template and save it, we can see in the /public/ directory (watching as admin on the server) the image appear with it’s name assigned a random string of characters. I.e. we can see the image is being uploaded.
In fact, selecting /public/randomstring.png where randomstring= the random string assigned by SuiteCRM, we can access the image in a browser.
But, when the message is sent the image does not appear in the email. We can’t figure out why this is occurring.
I have this issue all the time. Let’s say your site is at https://mysite.com then you add a picture and it creates a relational link like … /cache/images/myimage.jpg looks great.
But… then when you send the email, for some reason it doesn’t put in the https://mysite.com/ in front of it like it should do and the emails image links don’t work. What I normally do is just edit the link inserted in the email to http://mysite/cache/images/myimage.jpg (noticed I changed it to http). Then of course it redirects to HTTPS and gets the image, but I guess SuitCRM thinks its an external link now so it puts in the whole URL and not just the relational part. I suspect this is a bug because the email that gets sent includes a relational URL and not the full URL of the image (unless you do my workaround).
Makes sense, because the code for Email templates in Campaigns is exactly the same as for any other Email Templates.
Can you please try the fix? If it works I can try pushing to have this included soon. Since the fix is not in a PR, it is going completely unnoticed on GitHub…
:woohoo: :woohoo: :woohoo:
Thanks @pgr for comment before that. I found that Image issues are not displayed in Back_end of templete email and also will not display in email when received. (1) chmod and the (2) site_url and (3) host_name structure. I have tried to implement these 3 subsections and have succeeded.
As @pgr wrote upper:
'host_name' => 'www.mydomain.org',
'site_url' => 'http://www.mydomain.org',
and Chmod to right :
Chmod 755 folder: Cache and Images (into: your_site/cache/images/)
Perfect now, @pstevens let’s a check and follow one time again !
What exactly is “the fix”? I ask because we already arrived at the configuration changes suggested during our testing but it did not solve the problem.
the other are these changes to settings and permissions. Note that permissions can be tricky, I’ve seen a thousand times people think they have set permissions correctly, when they really haven’t. The most common mistake is not even knowing which user your web server is running under, and failing to set ownerships correctly.
Tried a PNG file - it doesn’t work either.
Symptoms are a bit different.
With JPG the received email has broken links where the image was.
With PNG there is no indication of an image at all.
Both JPG and PNG images display and save just fine in the template editor.