• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Apple Mail, HTML messages and text 1 VS character 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apple Mail, HTML messages and text 1 VS character 1


  • Subject: Apple Mail, HTML messages and text 1 VS character 1
  • From: Joe <email@hidden>
  • Date: Sun, 8 Jul 2007 11:14:19 -0700

I am attempting to script mail to transfer data to another application and have hit a few snags. Most notable is how Mail's "content" command handles 'some' (but not all) HTML messages.

For example, email from this list composed in HTML does not yield the body of the message using the "content" command. Here, content returns a "?" followed by the text appended by the server.

<Example>
"? _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40sbcglobal.net
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden"
<End Example>

When I send myself a HTML message and ask for "content" there is no problem, so I'm having a lot of trouble getting a handle on the problem of why some HTML messages gladly give up their content to AppleScript and some HTML messages do not, and how to identify the boogers ahead of time.

Another question I have is about how "text 1" returns different results depending on text type. The following two little scripts demonstrate.

<this fails>

set a to "? this is a test"
set b to text 1 of a
-->Can't get text 1 of "? this is a test".

if I had substituted (set b to character 1 of a) in the second line it would have worked

<this works>

set a to "? this is a test"
set a to a as Unicode text
--set b to text 1 of a
-->"?"

I would have thought these should be equivalent?

Thanks for any help.
Joe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Apple Mail, HTML messages and text 1 VS character 1
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Help about Word
  • Next by Date: Re: Apple Mail, HTML messages and text 1 VS character 1
  • Previous by thread: Ruth Bygrave has been ill
  • Next by thread: Re: Apple Mail, HTML messages and text 1 VS character 1
  • Index(es):
    • Date
    • Thread