Alpha Video Training
Results 1 to 5 of 5

Thread: Email - HTML vs. Plain Text

  1. #1
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default Email - HTML vs. Plain Text

    Some customers are having a few issues with e-mails send by A5 and I'm not sure what the best solution is. The problem is that some recipients can't see the body text. Any ideas appreciated....

    When using the older email_send routine I was using "Plain Text" because I assumed everybody could receive plain text but some might not be able to receive HTML text. Apparently this is not true because some recipients got a completely blank e-mail. What they saw on their screen was completely blank except for the subject. However, when they forwarded it to someone, the next recipient saw the whole message.

    Looking at the newer email_send2() function, there is both a "message" pointer and an "html_message" pointer. What's the best way to make sure all recipients can see the message - Send only HTML? Always send both?

    If I have to send both and the body text is really just plain text, is it necessary to add "break" tags to the "html_message" to make it show up with the right line feeds? (OK, I could easily test this myself but I just happened to think of it while typing.)

  2. #2
    Member neil_albala's Avatar
    Real Name
    neil_albala
    Join Date
    Nov 2005
    Location
    Kitsap Peninsula (near Seattle)
    Posts
    126

    Default

    I have done a LOT of experimenting with Alpha Five's email capabilities. At first I was using the email_send() function, but I did not want my users to use the Email Profile, so I ended up using the email_smtp_open() and the email_smtp_send() together.

    Code:
    	'send the message ==================================
    	DIM ps as P
    	DIM msg as P
    	msg.from = clientEmail
    	msg.from_alias = clientName
    	msg.to = sendto
    	'msg.bcc = "testing@gmail.com"  '???????????????
    	msg.subject = msgSubject
    	'msg.message = "This is the text body of the message"
    	msg.html_message = msgBody
    	msg.attachments = attachment_list
    	msg.xmailer = "Testing 1.1"
    	msg.lRelated = .T.  'T = attachments are embedded in HTML message
    	IF email_smtp_open(ps,clientSmtp)
    		email_smtp_send(msg, ps)
    		send_email = "ok"
    	ELSE
    		send_email= "Error sending this message..." + crlf(1) + "Check SMTP server address."
    	END IF
    	Email_smtp_close(ps)
    I completely ignore the msg.message property as this is what would create the "Plain Text" attachment. I just use the msg.html_message property. This way my messages arrives only with an "HTML text" attachment, which is the HTML body of the message AND any pictures.

    The key to getting the pictures to display right is the msg.lRelated = .T. parameter. This says, attachments are embedded in HTML message, and not separate.

    AND after all that, for some reason these messages show up very nice in both HTML email readers and my Pegasus email manager, which is primarly text based.

  3. #3
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default

    Thanks for the info. That's very helpful.

    Since you say you've experimented a lot, do you know what happens if I send a simple, two paragraph "text" message as the HTML_message without putting any HTML tags in it? Do all recipients see the two paragraphs as they were originally intended or does it end up looking like one longer paragraph to some systems?

  4. #4
    Member neil_albala's Avatar
    Real Name
    neil_albala
    Join Date
    Nov 2005
    Location
    Kitsap Peninsula (near Seattle)
    Posts
    126

    Default

    That is one test I did not run. Here's a suggestion. Take all the field names in my code and replace them with literals. For example, replace:

    msg.From with "joe@aol.com" (any address)
    msg.From_alais with "Joe Davis" (any name)
    mst.to with "your@email.com"
    Etc.

    Then you can paste the whole thing into the Immediate Window and run lots of tests very quickly.

  5. #5
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default

    Yeah but....

    The original problem occurs when other people try to read them. Any method seems to work just fine when I send them to myself.

    I was hoping maybe through experience you had found out how various methods were being received by others.

    I hate to send out an application "update" to 7-8 different customer just to find out it doesn't work properly. I'll call some friends with different e-mail systems (Outlook, AOL, Netscape, etc.) and ask them to let me send a few e-mails to see how they work.

Similar Threads

  1. Report Export as Plain Text File v6 to v7 Changes
    By johncupakjr in forum Alpha Five Version 7
    Replies: 4
    Last Post: 03-27-2006, 04:43 PM
  2. email and HTMl
    By Ian_Edwards in forum Alpha Five Version 6
    Replies: 5
    Last Post: 07-19-2005, 09:46 AM
  3. NetMailer - Plain Text vs. HTML
    By Michael Crawford in forum Alpha Five Version 5
    Replies: 1
    Last Post: 09-01-2004, 05:38 PM
  4. Plain Text, Letters, and formatting
    By Joseph Claeys in forum Alpha Five Version 5
    Replies: 1
    Last Post: 06-17-2004, 07:13 PM
  5. text editor plain text
    By alan meyerberg in forum Alpha Five Version 5
    Replies: 6
    Last Post: 04-08-2004, 08:01 PM

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
  •