Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: 4.5.1a Embedded images in campaign emails?

  1. #1
    Proware's Avatar
    Proware is offline A Prolific Poster
    Join Date
    Mar 2006
    Location
    Sydney Australia
    Posts
    310

    Default 4.5.1a Embedded images in campaign emails?

    I don't quite understand how embedded images in emails work.

    As I understand it, you attach images to the email then click the embed link. This puts it into the email.

    I have the following problems with this:

    1. A small blank image box appears to the right of the image in the email. I can delete this.

    2. When the email is sent, the results are different in Outlook than in Hotmail & Gmail. Outlook actually looks OK but Hotmail & gmail displays no images in the body of the email and places all images together as a bunch at the end of the email (ie not in the position I put them in).

    Is this how it is supposed to work? Is there not supposed to simply be an image icon in the FckEditor tools that you click on to drop an image into the email?

    Any help will be appreciated.
    Last edited by Proware; 2007-03-12 at 07:42 AM.
    Cheers

    David Younger
    TSM - The Service Manager
    http://www.theservicemanager.com


    Operating system type and version: Windows 2003 Server
    » Sugar Suite version 4.5.1e Professional
    » Webserver type and version Microsoft-IIS/6.0
    » PHP version 5.2.6
    » MySQL server version 5.0.51a

  2. #2
    Proware's Avatar
    Proware is offline A Prolific Poster
    Join Date
    Mar 2006
    Location
    Sydney Australia
    Posts
    310

    Default Re: 4.5.1a Embedded images in campaign emails?

    I have given up.

    I have reinstated my past Sugar Mods which give me a graphical image button in the Fcked Editor and converts this image automatically to an embedded attachment when the email is sent.

    This is much more logical than adding an attachment and then embedding it and having this messy double image etc.
    Cheers

    David Younger
    TSM - The Service Manager
    http://www.theservicemanager.com


    Operating system type and version: Windows 2003 Server
    » Sugar Suite version 4.5.1e Professional
    » Webserver type and version Microsoft-IIS/6.0
    » PHP version 5.2.6
    » MySQL server version 5.0.51a

  3. #3
    tamaravilhosa is offline Sugar Community Member
    Join Date
    Feb 2007
    Posts
    19

    Default Re: 4.5.1a Embedded images in campaign emails?

    Hi,

    Please, do not give up because I am with the same problem to attach and embedded images. The same small blank image appears and I deleted it/them.

    When I sent the e-mails, the result is: all images is placed outside the body, at the end of the e-mail, like our colleague told before.

    I am using the Open Source version and I updated today to 4.5.1b version. Is there some Sugar Mods that can be downloaded to the Open Source?

    Tks a lot,
    Tamara

  4. #4
    tamaravilhosa is offline Sugar Community Member
    Join Date
    Feb 2007
    Posts
    19

    Default Re: 4.5.1a Embedded images in campaign emails?

    Hi SugarCRM Developers,

    Does someone intend to evaluate this module??? Please, let us to know when the download will the available! We are anxious for news and corrections!

    Tks a lot,
    A heavy interest user

  5. #5
    fitumph is offline Junior Member
    Join Date
    Jan 2008
    Posts
    2

    Cool Re: 4.5.1a Embedded images in campaign emails?

    The reason why you are having problems is because the SugarPHPMailer.php file is hardcoded to treat every image as an attachment. This class can be found in /include/SugarPHPMailer.php . It is an extension of PHPMailer class. Here is the cause of the problem:

    Code:
      $this->AddAttachment($file_location, $filename, 'base64', $mime_type)
    Every image is marked as an attachment, and is not marked as an inline attachment.
    To display the image as embedded in the email, a different function AddEmbeddedImage is required. I have made a work around. All my images which need to be embedded, I use a suffix of 'inline'. Eg instead of 'Logo.jpg' I use 'logo_inline.jpg'.

    Then Add a couple of lines to SugarPHPMailer.php:

    Code:
    $filename = substr($filename, 36, strlen($filename)); // strip GUID     for PHPMailer class to name outbound file
        if (strpos($filename,'inline')) {
                       $this->AddEmbeddedImage($file_location,$filename,$filename,'base64',$mime_type);
         }else{
                        $this->AddAttachment($file_location, $filename, 'base64', $mime_type);
         }
    I have only tried this with version 5,0, However the class used is based on PHPMailer, so it should work.

    I'm not sure why it has been written like this, Have Fun

    http://www.jsimmons.co.uk

  6. #6
    csgsw is offline Member
    Join Date
    Feb 2008
    Posts
    8

    Default Re: 4.5.1a Embedded images in campaign emails?

    Quote Originally Posted by fitumph
    The reason why you are having problems is because the SugarPHPMailer.php file is hardcoded to treat every image as an attachment. This class can be found in /include/SugarPHPMailer.php . It is an extension of PHPMailer class. Here is the cause of the problem:

    Code:
      $this->AddAttachment($file_location, $filename, 'base64', $mime_type)
    Every image is marked as an attachment, and is not marked as an inline attachment.
    To display the image as embedded in the email, a different function AddEmbeddedImage is required. I have made a work around. All my images which need to be embedded, I use a suffix of 'inline'. Eg instead of 'Logo.jpg' I use 'logo_inline.jpg'.

    Then Add a couple of lines to SugarPHPMailer.php:

    Code:
    $filename = substr($filename, 36, strlen($filename)); // strip GUID     for PHPMailer class to name outbound file
        if (strpos($filename,'inline')) {
                       $this->AddEmbeddedImage($file_location,$filename,$filename,'base64',$mime_type);
         }else{
                        $this->AddAttachment($file_location, $filename, 'base64', $mime_type);
         }
    I have only tried this with version 5,0, However the class used is based on PHPMailer, so it should work.

    I'm not sure why it has been written like this, Have Fun

    http://www.jsimmons.co.uk
    Hi I have the same problem, I have try your modify... but it don't work...
    Editing che HTML code I see:

    <body><img alt="" src="cid:logo_inline.jpg" /></body>

    that's All.

  7. #7
    CaptainN is offline Member
    Join Date
    Feb 2008
    Posts
    5

    Default Re: 4.5.1a Embedded images in campaign emails?

    I tried this hack on my 5.0b hosted site (MS Server with MySql 4)and it broke the site. Only blank pages would load after adding the lines to the SugarPHPMailer.php file. Is this the correct code? There is a second typoed "$filenam e" listed. I tried removing the space and then the whole second reference of $filename to no avail.

  8. #8
    jeremy is offline Sugar Community Member
    Join Date
    May 2005
    Posts
    20

    Default Re: 4.5.1a Embedded images in campaign emails?

    This worked great for me when I fixed the space in filename and changed inline to jpg as it was hard for users to remember to add inline to their images.

    CaptainN this works on my 5.0.0d install. With the code above you will need to add _inline to your image names ie logo.jpg to logo_inline.jpg then it should include the image properly when attached to an email image in a campaign. Instead of doing that I just changed inline in the code to jpg so any file that has jpg in the filename will be included inline.
    Jeremy Heslop
    CBI Group, LLC

  9. #9
    walthy is offline Junior Member
    Join Date
    Feb 2008
    Posts
    2

    Default Re: 4.5.1a Embedded images in campaign emails?

    Thanks! This was a good workaround to fix this BUG for at least Outlook and Gmail clients, probably for all email clients.

    But I needed to remove the line with "strip GUID" (and also fix the "$filenam e"), and after that it worked fine for me.

    Is it a maybe a Windows feature to add 36 char GUID to the filename? I'm running under Linux, and I don't see this.

    Anyway, it might help someone else running on Linux to remove the line, until the source is corrected...

  10. #10
    stasilo's Avatar
    stasilo is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    London
    Posts
    26

    Default Re: 4.5.1a Embedded images in campaign emails?

    Quote Originally Posted by walthy View Post
    Thanks! This was a good workaround to fix this BUG for at least Outlook and Gmail clients, probably for all email clients.

    But I needed to remove the line with "strip GUID" (and also fix the "$filenam e"), and after that it worked fine for me.

    Is it a maybe a Windows feature to add 36 char GUID to the filename? I'm running under Linux, and I don't see this.

    Anyway, it might help someone else running on Linux to remove the line, until the source is corrected...
    On my istallation paperclip is not clickable, although minus symbol for removing attachment next to it is clickable.
    Osnova Solutions Ltd London UK SugarCRM experts

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Attached images showed in emails sent
    By matteoraggi in forum Feature Requests
    Replies: 0
    Last Post: 2006-12-20, 02:39 PM
  2. Replies: 1
    Last Post: 2006-06-13, 04:36 PM
  3. Inbound Emails - Images Only, NO Text
    By StanberrysINT in forum Help
    Replies: 0
    Last Post: 2006-05-24, 09:49 PM
  4. Multiple viewers of the same emails
    By cpalacios in forum Help
    Replies: 4
    Last Post: 2006-05-15, 02:58 PM
  5. How to Manage Emails?
    By patrickdight in forum General Discussion
    Replies: 5
    Last Post: 2005-10-21, 08:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •