Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Images in body of e-mail?

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

  • #31
    Re: Images in body of e-mail?

    Originally posted by MikeC View Post
    Hi Ray,

    I don't know if what Andrea said works or not but if it doesn't I think I made a bit of headway.

    Using the link Peter Wayne gave, I got something to work. It uses my Outlook Express. I sent an email to myself that has an image within the body of the message. I was also able to have text and an image go into an attachment. I do NOT know yet how to create the Letter as a PDF in the same motion but would think it could first be saved and then added as an attachment....
    Mike!!!! You have given me the clue I needed! Given that your code works and that it is really not fundamentally different from what I gave toward the very top of this thread (after I added the forgotten lrelated = .T. line, of course), I thought, maybe the problem is in Thunderbird, the e-amil client I use to receive my e-mail. So I went back to the Eudora 7 that I used to use, and my code works just as your's does!

    Damn that Thunderbird! Now I just have to ponder whether going down the road this could lead to is worth the trouble--not to mention that I still have to see if I can get the PDF letter in as an attachment that is just an attachment, not something in the HTML message.

    Thank you for focusing, in effect, on what was wrong with the code I presented (ultimately, nothing!).

    Ray Lyons

    Comment


    • #32
      Re: Images in body of e-mail?

      Good deal Ray.

      I also tested with jpg and works fine. I do not think it any problem having your Letter attached as PDF once it is saved as a PDF--just have the path to the Letter.pdf in the crlf list as the second attachment. You should be able to save the Letter as pdf in the database folder and then it becomes generic by using a5.get_path()+"your_pdf_name.pdf" for the attachment.
      Mike
      __________________________________________
      It is only when we forget all our learning that we begin to know.
      It's not what you look at that matters, it's what you see.
      Henry David Thoreau
      __________________________________________



      Comment


      • #33
        Re: Images in body of e-mail?

        Mike,

        Yes, I just tested with a PDF attachment in addition to the logo embedded in the message. Works just like I would need it to if I go down the road this is at least opening up.

        Thanks again.

        Ray

        Comment


        • #34
          Re: Images in body of e-mail?

          Originally posted by MikeC View Post
          Hi Ray,

          I don't know if what Andrea said works or not but if it doesn't I think I made a bit of headway.
          Well it certainly works in my app... ;)

          Comment


          • #35
            Re: Images in body of e-mail?

            Originally posted by Raymond Lyons View Post
            ....
            Damn that Thunderbird!
            Turns out I have to take back the “Damn Thunderbird” statement. Here is the whole sad story (more than you may want to know, so don't feel obligated to read on!):

            Case 1: Specifically from one client in particular I get emails form them all the time that have HTML messages with 2 logo images embedded in them. When it is a simple message they compose in Outlook, it automatically displays in my Thunderbird email client with the images displayed “inline,” embedded with the message, just as they intended.

            However, there were two cases in which the images just appeared as un-opened attachments:

            Case 2: Using A5's LETTER.SEND() to send a letter as a PDF attachment using the external windows email client (Outlook). Unchanged, this would be a simple text message because that's all MAPI can deal with and the interface between A5 and Outlook uses MAPI. But, once in Outlook the user can and did the canned A5 text message to HTML, and they then added their signature that includes 2 logos. When that came into my Thunderbird, the images were not embedded in the HTML message and instead were included as attachments along with the PDF letter file.

            Case 3 is what I was trying to do in this thread, i.e., use EMAIL_SMTP_SEND() with the LRELATED = .T. parameter to embed an image in the body of an HTML message. In this case too, what I got it in Thunderbird was no embedding, more or less just like Case 2.

            Because Case 1 had the images embedded whereas Case 2 & 3 did not, and Case 2 & 3 used A5 functions, I initially jumped to the theory that the problem had either to do with A5 or it had something to do with my A5 coding. Seemed like a reasonable theory at the time.

            Now it turns out that when I installed Thunderbird a long time ago, the default was to have “Display Attachments Inline” turned off. When I tuned that on, the Case 2 & 3 images are embedded in the HTML message, just like in Case 1. But since Case 1 images were embedded all along, it did not dawn on me that there even was a “Display Attachments Inline” setting I should look for.

            Now, I have no idea why instances of Case 1 do not require “Display Attachments Inline” to be on whereas Case 2 & 3 do. In any case, I guess on this score I can't damn Thunderbird too much if at all.

            To all who tried to help, sorry I didn't catch this sooner (without Mike's help I may never have).

            Ray Lyons

            Comment


            • #36
              Re: Images in body of e-mail?

              Does this mean you've solved your problem? I found the code I was looking for and it uses Email_client() in A5v7.

              As I recall, you said Email_client() presented a problem for you because you wanted to send many different e-mails with one action? In my case we were sending the same e-mail to many people so it was simply a matter of sending to a long bcc list.

              It appears that I also tried email_send2() with .lrelated set to .T. but it is remmed out. Don't know if that's because they wanted to preview it before sending or because it didn't work.

              Comment


              • #37
                Re: Images in body of e-mail?

                Andrea,

                Just to clear up something--I reread what you said especially this part which seems to contradict the help file..maybe you could elaborate a bit.
                declaring the source for the image properly e.g. as c:\image.jpg rather than just image.jpg).
                The help file regarding this states almost at the bottom of this link:http://support.alphasoftware.com/alp...IL_SEND2().htm
                Note: lRelated is set to .T., indicating that the attachments may be used in the HTML and that the filename in pm.attachments includes the path, but the filename in the <img src=""> tag does not include the path.
                which to me means to definitely NOT to have the full path in the html. Seeing as how your script also works there must be a reason as to why the help file makes this very clear statement to not do it your way---any idea as to why it would state this??? I haven't a clue! :)
                Mike
                __________________________________________
                It is only when we forget all our learning that we begin to know.
                It's not what you look at that matters, it's what you see.
                Henry David Thoreau
                __________________________________________



                Comment


                • #38
                  Re: Images in body of e-mail?

                  Ray, another option would be to use an HTML template that uses a full URL to the images, such as http://msgboard.alphasoftware.com/al...go_sm_gray.gif. Then when the email is displayed in the client, the image will be loaded from the specified server and displayed inline.

                  This also opens up a wide range of options for tracking if you want them because you can use code on your server, or even the server logs in a more simple case, to tell if the recipient has opened the email. I don't have any Alpha-specific examples of this but I think someone once posted a sample on here for user tracking.

                  Comment


                  • #39
                    Re: Images in body of e-mail?

                    Originally posted by MikeC View Post
                    Andrea,

                    Just to clear up something--I reread what you said especially this part which seems to contradict the help file..maybe you could elaborate a bit.
                    Hm... good point... will have to check, it looked to me like part of the problem was that one pointer says the file is on C:\ the other looks for it in the root of your app/data directory... It seems to work both ways for me but that might be coincidence.

                    Comment


                    • #40
                      Re: Images in body of e-mail?

                      Some of the email tracking stuff is detailed up on my blog, see my signature area.
                      Steve Wood
                      Join the ALPHA DEVELOPERS NETWORK
                      There is no Cloud. It's just someone else's computer.
                      Web - Mobile - Hosting - Products - Frameworks - Developer Resources
                      AlphaToGo | IADN (100% Alpha Anywhere Websites)

                      Comment


                      • #41
                        Re: Images in body of e-mail?

                        Originally posted by CALocklin View Post
                        Does this mean you've solved your problem? I found the code I was looking for and it uses Email_client() in A5v7.

                        As I recall, you said Email_client() presented a problem for you because you wanted to send many different e-mails with one action? In my case we were sending the same e-mail to many people so it was simply a matter of sending to a long bcc list.

                        It appears that I also tried email_send2() with .lrelated set to .T. but it is remmed out. Don't know if that's because they wanted to preview it before sending or because it didn't work.
                        Cal,

                        Email_send2() with .lrelated set to .T. would have been the one relevant to the problem I was looking at. As for it being "solved", yes for the most part, but it had nothing to do with wanting to send many different e-mails with one action. I say "solved for the most part" because having functions that will embed an image has opened up new possibilities, I think both for using the internal A5 e-mail client and, via EMAIL_SMTP_SEND(), an option that does not require setting up the A5 client and also bypasses the external client and MAPI. Now the question is whether pursuing these possibilities is worth the trouble, i.e., the cost.

                        As always, thanks for your help.

                        Ray Lyons

                        Comment


                        • #42
                          Re: Images in body of e-mail?

                          Finally getting back to this thread. There have been so many posts and so much to read way above and beyond my patience's breaking point.

                          I don't know if you have solved your issue or not, but this thing has more nooks and crannies than meets the eye. I got this thing working and fully automated where you could send an email to the moon from Mars and put anything in it.

                          I will attach a zip file hopefully this evening when I get done with everything else I have to do, that's unless you spare me the agony and say that you don't need it any more.

                          Well, do you?

                          Comment


                          • #43
                            Re: Images in body of e-mail?

                            Originally posted by G Gabriel View Post
                            Finally getting back to this thread. There have been so many posts and so much to read way above and beyond my patience's breaking point.

                            I don't know if you have solved your issue or not, but this thing has more nooks and crannies than meets the eye. I got this thing working and fully automated where you could send an email to the moon from Mars and put anything in it.

                            I will attach a zip file hopefully this evening when I get done with everything else I have to do, that's unless you spare me the agony and say that you don't need it any more.

                            Well, do you?
                            You are so right about the nooks and crannies this has gone through. Because of that, YES, a zip of what you have done would would not only help me but other too, I am sure.

                            Thanks in advance.

                            Ray

                            Comment


                            • #44
                              Re: Images in body of e-mail?

                              Trying to attach a zip file, but it won't upload.
                              Maybe, we'll have to do this the hard way.
                              Edit:
                              Let's see if this will upload:
                              Last edited by G Gabriel; 06-17-2008, 03:22 PM.

                              Comment


                              • #45
                                Re: Images in body of e-mail?

                                Sorry for the delay. I got a little frustrated. I wrote the script, ran it, video-tapped it, ran several times, it ran flawlessly each and every time. Then I did a dumb thing. I wrote this script on a button on a form. Normally I would write a script using the code tab and just click save as I go along. Distracted, I clicked the save icon by habit and as you would expect, nothing was saved since I didn't save the form on exiting. Got frustrated and Just didn't feel like re-writing it at that time, but I will.

                                There could be several versions of this:
                                1-The full monty: where you will subsitute the script for any other email. It will have all the required information: i.e. subject, attachments, body etc.
                                The end user would fill out this information, click, the email will be sent with the company logo on top and the user's signature at the bottom. You could emblish on this to save a copy of the sent email.

                                2-The stripped down version would just add to your routine the part of the logo and signature

                                3-In either of these cases, the user would enter his/her info but that could be entered each time they wish to send an email or entered once and saved.

                                As you see, this is more like an applette not just a script. you could use this to send all your emails and it will dynamically capture the logo and/or signature you choose, send from one email or a different one, send any information from any table you specify, any greeting, specify a certain signature, a different signature, no signature, a foot note ..etc.

                                Now you could understand my frustration when it didn't save.

                                Comment

                                Working...
                                X