Welcome, Guest
Username: Password: Remember me

TOPIC: Image Path for Emails uses private site url; want to hard code path to public folder for emails

Image Path for Emails uses private site url; want to hard code path to public folder for emails 3 days 21 hours ago #88253

  • mcolangelo
  • mcolangelo's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Long subject....

We use SuiteCRM, but requires VPN to access it, until now...I have had my engineering team setup a public url to access it because we want to leverage more of the email capabilities (tracking links, campaign tracking, etc...)

The tracker links work well because I was able to setup the proxy link in the settings.

The images that are attached however, are retaining the private link, even if i use the path with the public url in the image field SOURCE field and save it.

Questions are:
- Can the path be hard coded in the php configuration for mailing? I believe it is the phpmailer.php file that requires it
- Is there a better way, do I have to change the siteurl in the config files?
- is there another solution....

* Add an embedded (inline) attachment from a file.
* This can include images, sounds, and just about any other document type.
* These differ from 'regular' attachments in that they are intended to be
* displayed inline with the message, not just attached for download.
* This is used in HTML messages that embed the images
* the HTML refers to using the $cid value.
* Never use a user-supplied path to a file!
* @param string $path Path to the attachment
* @param string $cid Content ID of the attachment; Use this to reference
* the content when using an embedded image in HTML
* @param string $name Overrides the attachment name
* @param string $encoding File encoding (see $Encoding)
* @param string $type File MIME type
* @param string $disposition Disposition to use
* @return bool True on successfully adding an attachment
public function addEmbeddedImage($path, $cid, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'inline')
if (!static::isPermittedPath($path) || !@is_file($path)) {
$this->setError($this->lang('file_access') . $path);

return false;

// If a MIME type is not specified, try to work it out from the file name
if ('' == $type) {
$type = static::filenameToType($path);

$filename = basename($path);
if ('' == $name) {
$name = $filename;

// Append to $attachment array
$this->attachment[] = [
0 => $path,
1 => $filename,
2 => $name,
3 => $encoding,
4 => $type,
5 => false, // isStringAttachment
6 => $disposition,
7 => $cid,

return true;
The administrator has disabled public write access.
Time to create page: 0.066 seconds
Powered by Kunena Forum