Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8124667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:32:02+00:00 2026-06-06T06:32:02+00:00

I’ve been able to hack my way through scripting bridge and apple mail and

  • 0

I’ve been able to hack my way through scripting bridge and apple mail and can now send emails from my cocoa program. Now, I’m trying to send HTML mail and have run into a snag. In short, I have generated an NSString containing the entire HTML code from the open html tag through to the slash-html close tag with all the goodies in between.

However, when I pass that as content through scripting bridge, all I end up with is a email in which I can read the HTML code… I would say it’s plain text, but links still show as clickable links, so that’s not entirely true.

If I open the code in Safari, the HTML displays correctly.

I thought perhaps it may have to do with the header information in the email message, but if there is a way to set that through scripting bridge, I haven’t found a way to do that yet. Again, since links are clickable, I’m thinking they may not be the problem?

If there is a way to set the header information to “Content-Type: text/html; charset=ISO-8859-1” and “MIME-Version: 1.0” and anyone knows how, please enlighten me 🙂

If not, does anyone have any suggestions? I’m sure that I must be missing something, and I’m hoping it’s simple.

* EDIT *

I tried opening my HTML file in Safari and using the FILE>Email Contents which then creates a new email in Apple Mail. This new email is viewable as HTML. Thus, I know it must be possible to do this.

I then send that email to myself, as well as a non-html email.

Inspecting just the header information on both files revealed that the content-type is identical on both of these emails, being listed as:

multipart/alternative; boundary="Apple-Mail=_D0859731-3A0F-459E-9673-DEC0FC6503BF"

Of course, the ID string is different on each email sent…

However, when viewing the raw source, the HTML file does in fact have a second content-type which specifies “text/html” just before the HTML code (which I interpret to mean that the multipart/alternative simply instructs the mail app to look for additional content-type tags…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:32:03+00:00Added an answer on June 6, 2026 at 6:32 am

    From what I can tell, Apple does not allow you to directly send an HTML email through scripting bridge. I could speculate on the reasons they frown upon this (spam, security, etc.) but it seems that it is what is is.

    The workaround was to open the HTML in Safari and then use Scripting Bridge to “Email Contents of This Page” to Mail. This creates a new outgoing mail in Mail.app which contains the HTML code.

    NOTE: One side effect I’ve noticed however, is that when using scripting bridge to add recipients to the email after it’s been created by Safari, an additional DIV tag with in-line code is created for each and every recipient. Thus, as the default is to add a line break before and after each DIV tag on display, the HTML code begins further down the page for each recipient added. A workaround is to use CSS in your HTML code to override the default display behavior for DIV tags. I’ve explained it in more detail here:

    Scripting Bridge adds unwanted HTML code when adding recipient to mail

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.