HTML email signature using vbs won't insert an image.

Posted on 2012-08-29
Last Modified: 2012-08-31
I am using a vb script to create a standard email signature for our staff, and the script will run at log in. All works well except for the insertion of an image(s) of our logo.

For the insertion of the image, the relevant line in the script is:
htmlFile.Write("<div><img Border =""40"" align=""Left"" width=""1000px""img src=""" & pathToCopyTo & dsqLogoSmall & """>")

When I test the script by running it for just myself, it creates the signature , and inserts the image correctly, when I view the results by clicking on new email in Outlook.
However, if I view the results In Outlook by going File -> Options _> Mail -> Signatures and opening in to the area where a signature is manually created /edited, I can see the text of the signature I have created, but no inserted images.
When I send an email , there is a blank area where my image should be , but is not - and this is in situations where the the email client isn't blocking images, because if I maually insertt an image in to the signature that has been automatically created by the script, the image is inserted and can be seen when an email is sent
Am I inserting the image in the incorrect way using my vb script ?
Question by:JimGor
    LVL 17

    Accepted Solution

    Can you provide an example of what (pathToCopyTo & dsqLogoSmall) would resolve to?  Maybe this is a file/folder  permissions error.  What if you substitute a url instead (img src = """"
    LVL 29

    Expert Comment

    In my opinion just have the file copied to the signature folder first and than just add the name to src=""image.jpg"" for example, you could to this through the script, it's generally best not to use an absolute path in a signature.

    Author Comment

    I've decided to point to a URL instead, nameley our web site, with the logos stored under a folder there. This seems to be working in most situations - naturally if an email recipient is reading email off-line, they won't see the logos., but I guess a lot of email applications, block the downloading of images , anyway.
    Thanks for your help and prompt reply.
    LVL 29

    Expert Comment

    Actually my solution works since the image is embedded into the email, so appears as part of the email, I've used the same method to build a company signature creator in AutoIT it uses Active Directory to obtain the users information, phone, mobile etc... and displays the company logo + facebook, twitter linkedin images as embedded rather than links.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
    Easy CSR creation in Exchange 2007,2010 and 2013
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now