Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Image in Email Campaign

Image in Email Campaign 9 months 2 weeks ago #70207

  • jfd118
  • jfd118's Avatar
  • Offline
  • New Member
  • Posts: 12
  • Karma: 0
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.

Any help or guidance is appreciated.

Thanks,

jfd118
The administrator has disabled public write access.

Image in Email Campaign 7 months 2 weeks ago #72330

  • TaufiqueAhmed
  • TaufiqueAhmed's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 476
  • Thank you received: 53
  • Karma: 16
I have just sent an email campaign from SuiteCRM 7.10.7

Had a similar issue

Couple things


When adding images into the "source URL" - are you adding the full CRM URL?


One thing I did different to get them through is create my own /images/ folder on the server and upload via FileZilla

Then used full url/images/image.jpg
Kind Regards,

Taufique Ahmed
The administrator has disabled public write access.

Image in Email Campaign 7 months 2 weeks ago #72333

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9857
  • Thank you received: 1469
  • Karma: 349
And check these values in your config.php

site_url
host_name

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Image in Email Campaign 7 months 2 weeks ago #72347

  • hoasenvang7799
  • hoasenvang7799's Avatar
  • Offline
  • Senior Member
  • I want a banana
  • Posts: 49
  • Thank you received: 4
  • Karma: 0
pgr wrote:
And check these values in your config.php

site_url
host_name

Two with_in :: site_url and host_name with the full subdomain: https:// suitecrm.mysite.com

And the image does not show on any Email templates, I have been trying for months now. still no picture..
Enjoy and passionate Open Source
Last Edit: 7 months 2 weeks ago by hoasenvang7799.
The administrator has disabled public write access.

Image in Email Campaign 7 months 2 weeks ago #72351

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9857
  • Thank you received: 1469
  • Karma: 349
I have them like this, notice the slight difference (and avoid any slashes "/" at the end):
  'host_name' => 'www.mydomain.org',
  'site_url' => 'http://www.mydomain.org',

In your browser, when you're looking at the page, is the link to the broken image well formed?Does it show the correct URL for your host?

If you increase permissions on the image dir and file, does it solve the problem?

What about removing the image from the template, and adding it again?

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Image in Email Campaign 7 months 2 days ago #73053

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 181
  • Thank you received: 20
  • Karma: 4
I have this issue all the time. Let's say your site is at 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 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).
Last Edit: 7 months 2 days ago by pstevens.
The administrator has disabled public write access.

Image in Email Campaign 7 months 2 days ago #73067

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9857
  • Thank you received: 1469
  • Karma: 349
So, what this boils down to is

1. In SuiteCRM 7.10.9,
2. Start editing an email template
3. Add an image
4. The URL is improperly formed, it is missing the domain name

Is this it? Does the issue exist on Github?

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Image in Email Campaign 7 months 2 days ago #73098

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 181
  • Thank you received: 20
  • Karma: 4
Yes, that's exactly what happens @pgr

Looks similar to this issue on Github. But in my experience, it's not just campaigns that cause the problem but all email templates.

5662

Someone suggested a code fix, haven't tried it yet.
Last Edit: 7 months 2 days ago by pstevens.
The administrator has disabled public write access.

Image in Email Campaign 7 months 1 day ago #73128

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9857
  • Thank you received: 1469
  • Karma: 349
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...

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Image in Email Campaign 7 months 1 day ago #73133

  • hoasenvang7799
  • hoasenvang7799's Avatar
  • Offline
  • Senior Member
  • I want a banana
  • Posts: 49
  • Thank you received: 4
  • Karma: 0
jfd118 wrote:
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.

Any help or guidance is appreciated.

Thanks,

jfd118

: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 !
Enjoy and passionate Open Source
Last Edit: 7 months 1 day ago by hoasenvang7799.
The administrator has disabled public write access.

Image in Email Campaign 7 months 1 day ago #73140

  • jfd118
  • jfd118's Avatar
  • Offline
  • New Member
  • Posts: 12
  • Karma: 0
Hello,

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.

I.e. we are already at

"As @pgr wrote upper:
'host_name' => 'www.mydomain.org',
'site_url' => 'www.mydomain.org',

and Chmod to right :
Chmod 755 folder: Cache and Images (into: your_site/cache/images/)"

but it does not resolve the issue.

Thanks,

jfd118
The administrator has disabled public write access.

Image in Email Campaign 7 months 1 day ago #73148

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9857
  • Thank you received: 1469
  • Karma: 349
There are two different things that people are claiming is "a fix":

- one is in github.com/salesagility/SuiteCRM/issues/5662 , you have to read the text and see what some users advise.

- 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.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Image in Email Campaign 7 months 1 day ago #73150

  • pstevens
  • pstevens's Avatar
  • Offline
  • Elite Member
  • Posts: 181
  • Thank you received: 20
  • Karma: 4
Ok so I've done some testing, here's what I've learned:

1. The proposed fixes on Github don't work. (I tried them both).
2. It's not a security issue or a site URL issue, I know this because .PNG files work. (and my permissions and site url are good).
3. If you upload a .PNG file works no problem and sends email with proper embedded image.
4. If you usea .JPG it shows in editor, but when you save it disappears and also does not send it in the email.
5. .GIF files will not upload at all.
The administrator has disabled public write access.

Image in Email Campaign 7 months 16 hours ago #73188

  • afatac
  • afatac's Avatar
  • Offline
  • Senior Member
  • Posts: 78
  • Thank you received: 3
  • Karma: 0
I reported an issue Email module: Why is the inserted image not shown in the received email?

I am wondering are these two issues related?
The administrator has disabled public write access.

Image in Email Campaign 7 months 13 hours ago #73190

  • hoasenvang7799
  • hoasenvang7799's Avatar
  • Offline
  • Senior Member
  • I want a banana
  • Posts: 49
  • Thank you received: 4
  • Karma: 0
jfd118 wrote:
Hello,

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.

I.e. we are already at

"As @pgr wrote upper:
'host_name' => 'www.mydomain.org',
'site_url' => 'www.mydomain.org',

and Chmod to right :
Chmod 755 folder: Cache and Images (into: your_site/cache/images/)"

but it does not resolve the issue.

Thanks,

jfd118

B-) check for you right !
 'host_name' => 'www.mydomain.org',
 'site_url' => 'http://www.mydomain.org',  <--- Full URL with http:// or https://
Enjoy and passionate Open Source
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.058 seconds
Powered by Kunena Forum