ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

HTML Emails and Images....How to include..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scott M
    replied
    Re: HTML Emails and Images....How to include..

    It looks like the image is in the email but not being downloaded - it is usually an option in your email client whether to automatically download pictures. Try right clicking the image area and select 'Download image' or similar if it shows on the menu.

    Leave a comment:


  • NYCountryGal
    replied
    Re: HTML Emails and Images....How to include..

    @Scott - Yes, I am trying to include the image (the company logo) in the email. Our web programmer gave me the HTML source for retrieving the company logo from our website and I put that in my code but I didn't get the image (see below). I checked the SNDHTMLEML program and it does include the multipart/related, so I am scratching my head now.

    PHP Code:
    header = %trim(header) +'Date: ' maildate CONST_LF           
             
    +'Subject: ' parmSubject CONST_LF                   
             
    +'MIME-Version: 1.0' CONST_LF                         
             
    +'Content-Type: multipart/related; boundary="MSG_PART"' 
             
    CONST_LF CONST_LF '--MSG_PART' CONST_LF         
             
    +'Content-Type: text/html' CONST_LF                   
             
    +'Content-Disposition: inline;' CONST_LF CONST_LF   
             
    CONST_LF
    Here's a picture of the email:
    Click image for larger version

Name:	Example HTML Email with logo.jpg
Views:	1
Size:	32.5 KB
ID:	126693

    Am I perhaps doing something wrong?

    @DeadMan - you remember how Kale wanted to send our clients an email with a link to the company website when their billing was ready? That's what I am working on right now - from the FourSoft side - for the US side of the business. When we get it figured out, we're going to add same processing to Canada side. Only changes since you left - we're up and running 45% of the US clients on FourSoft now.

    Basically - I didn't know if I wanted to include an image in the email if I needed to include some special wrappers or anything.

    I've included a PDF of the SNDHTMLEML code so you can tell me if it's missing something .... I haven't a clue. I'm just trying to satisfy the CEO's request for an automated email to our clients when their billing is ready...
    Attached Files

    Leave a comment:


  • Scott Klement
    replied
    Re: HTML Emails and Images....How to include..

    If you want to send the images inside the e-mail itself, then you need more than just plain HTML. You need to creae a multi-part MIME message using the "multipart/related" content type. I'm assuming that a command named SNDHTMLEML doesn't do that, but I could be wrong...

    The other approach is to have HTML with http:// URLs for the images. This will allow the images to be downloaded via a web server, but most E-mail clients will not show the images by default in that case, you'll have to tell it to download them explicitly, or add the sender to a "safe senders" list. Otherwise, there are privacy concerns with this approach.

    Leave a comment:


  • DeadManWalks
    replied
    Re: HTML Emails and Images....How to include..

    html just points to stuff. so look at a page and see that it points to the image on the server.

    When you get an image with images, exchange pops a button to see if you want to download the images. To stay with Html, you have to do it this way.


    You could create a PDF that has the image in it.

    Leave a comment:


  • NYCountryGal
    started a topic HTML Emails and Images....How to include..

    HTML Emails and Images....How to include..

    Hi!

    I'm back .... Okay I got my HTML issue resolved and working. I took the easy way and I created a CL and I pass the values to the CL and I use the SNDHTMLEML command that was written by David Faust that I found on the internet and I am using that. Works great once I got help in figuring out what I was doing wrong with the HTML code.

    On to my next issue ... I want to make the HTML email that I am sending to our clients to look polished - so I want to include the company logo. I just have to include that as part of the HTML code correct and it should work - right? I was just reading an article on the web and it talked about the image having to be on the internet and my mind stopped and said wait a minute I remember something about that from the HTML classes I took years ago.

    So an inquirying mind wants to know ... do I need to worry about that?

    Thanks!
    Roxann
Working...
X