Possible bug with HTML emails and attachments from Mail.app

I'm trying to send an attachment with an HTML email from Mail.app and getting unexpected results. I've been messing around with the order that things get added to the new e-mail and it seems that I can have either an attachment or I can have HTML email, not both.
The code... (of course simplified)
tell application "Mail"
set new_message to make new outgoing message with properties {subject:"A subject", sender:"[email protected]"}
tell new_message
set visible to true
make new to recipient at end of to recipients with properties {address:"[email protected]"}
tell content to make new attachment with properties {file name:alias "Path to your file as string"} at after the last paragraph
set html content to "<head><body>Some HTML here...</body></head>"
end tell
send new_message
end tell

etresoft wrote:
The problem is that there is no such thing as HTML email.
Well, I wonder what I have been generating for over three years now. RTF ? Because it sure looks like HTML. I must agree that HTML is not documented or even mentionned in the Mail AS dictionnary, but it does work, though you must specify visible to false so that it does. Here's my sub:
tell application "Mail"
set DMF to default message format
set default message format to plain text
set newMessage to make new outgoing message with properties {subject:theSubject}
tell newMessage
set visible to false
set sender to theSender
make new to recipient at end of to recipients with properties {name:Photographer, address:theAddress}
set html content to "<html><head><title>" & theSubject & "</title></head><body>" & "This is an automated response." & theSource & "Find your personnal planning on the web: " & thelink & "
</body></html>"
end tell
send newMessage
set default message format to DMF
end tell

Similar Messages

  • Some HTML emails get corrupted in Mail.app

    I get a lot of HTML emails and just occasionally Mail.app seems to mangle the headers and think the mail is plain text, which means the attachments are useless. I then have to resort to Thunderbird to read the email.
    The corrupted emails usually start as follows:
    --Boundary-00=_T7P340MWKGMMYJ0CCJD0
    Content-Type: Multipart/Alternative; boundary="Boundary-00=_Z7P340MWKGMMYJ0CCJD0"
    --Boundary-00=_Z7P340MWKGMMYJ0CCJD0
    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: quoted-printable
    Anyone any ideas what is going wrong or how I might stop this from happening?
    John

    Hi Shang_Li,
    Unless you pay for the Hotmail premium account, the default mail access for Hotmail is POP3. By default when you "pop" a message off the mail server it removes that message from the server. That's why the messages are missing from the web interface. When you configure POP you have the option to leave a copy on the server for a specific period of time.
    Here's a good URL that explains the process - http://support.apple.com/kb/ht3228
    If you don't want mail to be removed off the server you can just uncheck the box that's mentioned in the above article. Or if you do want to have messages removed you can specify how long they're kept on the server (viewable on the web) after you access them in Mail.

  • HTML email and attachments don't work

    I have programmed a simple PHP script to format a web page form response and send an email message as a report to my client as an HTML email, plain text alternate part, and with a small attachment. My client, using Apple Mail on OS X, only sees a plain text dump of the entire email message, headers and all. His mail client shows other people's messages of this sort properly. The hitch is that I can't figure this one out, because the same mails, when sent to other people, are perfect. They display properly in Windows email programs, and other people's Mac-based mail programs, and perfectly on any web mail interfaces I can find (e.g. Horde, etc). Does anybody have any suggestions as to what might be going on in this instance? (My customer has standard Apple Mail running in some recent flavor of Mac OS X).
    Budsy

    There is probably something wrong with your message. Send one to me at info at etresoft dot com and I should be able to tell you what it is.

  • Possible bug with Pick flag and Collections

    Odd behaviours in v3.3  (Windows) with pick flags in Collections:
    Create (or use) a Collection Set which contains a number of different collections
    Assign Pick plag to one photo in each collection
    Bug 1: Highlight Collection Set and note that none of the images shows the Pick Flag in the thumbnail view. Also Filtering this view with Pick flag fails to pick up the Flagged images
    Now return to one of the Collections within the Set and create a Virtual Copy of one of the images that has a Pick flag. (Note virtual copy does not have a flag - which seems logical). Return to Collection Set and (Bug 2) note that Pick flag has disappeared from original image and now appears on Virtual copy.
    Something wrong here somewhere I suspect.

    lightshop wrote:
    Odd behaviours in v3.3  (Windows) with pick flags in Collections:
    Create (or use) a Collection Set which contains a number of different collections
    Assign Pick plag to one photo in each collection
    Bug 1: Highlight Collection Set and note that none of the images shows the Pick Flag in the thumbnail view. Also Filtering this view with Pick flag fails to pick up the Flagged images
    Now return to one of the Collections within the Set and create a Virtual Copy of one of the images that has a Pick flag. (Note virtual copy does not have a flag - which seems logical). Return to Collection Set and (Bug 2) note that Pick flag has disappeared from original image and now appears on Virtual copy.
    Something wrong here somewhere I suspect.
    I could partially repeat bug 2.
    I have Collection Set (Test) which contain to collections: "Collection 1" and "Collection 2". Both Collections contain 4 images.
    I selected "Collection 1" and applied Pick flag to all those images. When I select Test (Collection Set) I got 8 images shown,  which none had flags. Ok, this works as expected. I selected "Collection 1" and then selected 1 image and made Virtual copy from it. Lr show me now 4 images with Flag and 1 virtual copy without. Again, works as expected. I now select Test (Collection Set) and I get 9 images (as expected), but one of them, the virtual copy, has pick flag applied. Not as expected. If I go back to "Collection 1" I get four images with Pick flags and one virtual copy without. (as expected.)

  • Is there a bug with creating a contact out from an app?

    I work with my iPhone 3GS OS 3.1.3 and use email, calendar and contacts fully synchronized with the Exchange server at the office. And so far, It works great. But, unfortunately, is there a little bug.
    I use only the contacts folder from Exchange and there is no "local" iPhone only contacts folder. But now when I create a new contact out from an app, Maps for example, it is not stored in a default contacts folder (I can also not define such a one anywhere), but somewhere in nirvana??
    In the contacts, he is nowhere to be found, and is therefore not synchronized with my Exchange server. Only with the iPhone search this contact can be found and is still accessible.
    Someone else has also noticed this problem already? Is there a workaround for it?

    It's part of your dev agreement, especially when working with betas. If you can get in to download them, you should be able to hit everything else, including the forums.
    Get the login sorted out and you'll have significant resources that will make it worthwhile.
    Typically that bounce needs you to use the Safari(Mac) menu 'Empty caches'.
    Good luck in any case.

  • Can't open PDF email attachments from mail app. (iOS7, iPad2)

    Since upgrading to iOS7 I cannot open PDF email attachments from the "Mail" app. The attachment appears as a "tap to download" icon, after downloading it appears as an image of the first page of the PDF. An extended press of the PDF image results in "save image" and "copy" options, but no "open in" option.
    I have tried closing and re-opening mail, restarting the iPad, several different attachments. Still no "Open in" option.
    Any help with this?

    I work in a support organization and we've seen variations of this issue develop on various iphones and ipads with ios7.  Oddly, not everyone is experiencing this, just some people.
    In my own case, I simply downloaded Acrobat Reader for free and can read the things fine.
    We use an exchange activesync email server and when each email comes in it indicates at the very bottom that it has been downloaded as plain text and to click to download the entire message.  I've tried clicking to download and not clicking and I can read the PDF either way.
    In my own case I can view PDF files and/or also save them by pressing and holding the icon of the PDF in the email.
    The other thing one of our end users noticed: if she emailed the PDF directly to her iPhone5 and iPad it would not be readable but if she forwarded it to her offsite Yahoo account and then forward to her corporate email it would open.
    I think there's definetely something going on with the formatting of the PDF (was it created by a true Adobe PDF distiller or one of the many clones?), what email application attached it? (Outlook, Eudora, IOS Mail, etc) and how many PDF reading apps are on your IOS devices?
    For instance I have the default PDF reader, iBooks, Kindle, Adobe Acrobat Reader, and there may be others that I don't even know has PDF capability.   Only Apple probably has a good idea of how many apps utilize this.
    Message was edited by: aliensporebomb - clarification

  • Remove attachments from mail app with imap account

    Hi Folks,
    I am quite frustrated. I am using Apple's mail app with Gmail (IMAP) and I want to remove all of my attachments from Gmail. I am using the 'remove attachment' feature of mail app to do this. However, it removes the attachment, then uploads a copy of the original email without the attachment. Therefore, I end up with two emails: The original and a copy without an attachment.
    I don't get it. I just want to remove the attachments from my emails. I don't want to delete the original email.
    Any thoughts?

    I am not sure when I will get the chance to test this -- maybe this afternoon. But I had not understood that what you called original continued to have the attachments. If so, this strongly suggests to me that it indeed may be the way Gmail maintains the All Mail folder that is causing this. See:
    http://mail.google.com/support/bin/answer.py?hl=en&answer=6581
    If there is a setting to help this, it will have to be one that is selected in the Settings webpage of Gmail, I suspect.
    Ernie

  • Change to dragging attachments from Mail.app in Mavericks

    It seems now Mail.app needs to be the active window when dragging attachments from an email. This means not just an extra click but often the finder window gets hidden behind Mail and this is a bit of a pain. Also there has been a change with the selection of attachments when dragging, sometimes dragging two if one is selected and you drag another.
    Has anyone also found this a problem and found a work around or settings change? It is certainly slowing me down

    I likewise can no longer drag attachments from a mail message to a Finder window - with Mail being frontmost or not - multiple items or a single item. I can only perform a "Save All (size) ..." from within the message - which does work fine to the same intended destination. This is on the replacement Mail.app 7.0 (build 1822).
    On a related note, Maverick Mail.app seriously broke addressing groups from within the addressing lines (via text matching). I have to openthe addressing windoid, select the group manually, then select the desired recipients onthe right side and then click the addressing line desired. Very narrow UI resprictions. What did they do to Mail???
    Two annoyingly unresolved issues with Mavericks Mail - quite broken from before.

  • Possible bug with Tab Control and Context Help?

    I created Description and Tip text for each Tab of a tab control I am using on my front panel.  I have a subVI that is called by selecting a menu item from my main front panel.  The subVI's front panel also has a menu system and a Tab Control.  I have Description and Tip text written for each of the tabs on the subVI's front panel.
    When I enable context help from the menu of my main VI, the proper help text shows up for the tabs on the main vi and, when I bring up the subVI's front panel, for its tabs as well.
    So far so good...
    Now I builld the application and run it as an executable.  For ALL of my panel tab descriptions, I get the tab's label in bold text, but no description (just a blank area).
    Is this a bug in LabVIEW?
    Kevin 

    wired wrote:
    I'm still seeing this behavior in LV8.2.1.  Does anyone know if/when it was fixed?  Also, my tip strips show up in the corner of the monitor when I mouse over a tab (in both the executable and the development version).
    I see it still even in 8.5.  
    The Help part of the bug is still NOT fixeed by NI.
    But I dont get the tool tip appearing in the corner of the monitor, it is showing up as usual.
    - Partha
    LabVIEW - Wires that catch bugs!

  • Using Thunderbird/Firefox - since last upgrade, issues with HTML emails and opening PDF

    Since last upgrade, it seems that I'm having 2 (maybe 3) problems:
    1)  emails have white/grey horizontal lines in the bottom half of the email's text or graphics
    2)  can't open pdf files - when I could without issue before upgrade
    3)  Adobe Reader - I've downloaded updates, but they won't install.  (says not compatible with my computer, but running Mac OSX 10.6.8  (I even downloaded Opera brower to see if that would work, but there still seem to be Adobe issues)
    Any thoughts?

    mknabster wrote:
    Now i'm thinking it has to be those 10K fonts I put on there into the Font app.
    I think you are correct, that was not a good idea.
    Hopefully they all wound up in Home/Library/Fonts.  You can safely delete everything in there, as OS X does not put anything in that folder.  Fonts part of the OS are
    http://www.prepressure.com/fonts/basics/snow-leopard-fonts/list

  • Search Google with Firefox instead of Safari from Mail.app

    Is there a way to have Mail use Firefox when searching a term via Google from within Mail instead of Safari?
    My default browser is Firefox but mail launches Safari instead.
    (See image for clarification)
    http://skitch.com/gagegecko/ngepy/fullscreen-2

    GageGecko wrote:
    Is there a way to have Mail use Firefox when searching a term via Google from within Mail instead of Safari?
    no. that service is hard coded into Mail. you can not change it. it will use safari no matter what your default browser is.
    My default browser is Firefox but mail launches Safari instead.
    (See image for clarification)
    http://skitch.com/gagegecko/ngepy/fullscreen-2
    P.S. you can probbly make your own service using automator that will search using firefox.
    Message was edited by: V.K.

  • How to: Flatten Adobe PDF Portfolio containing email and attachments

    How do you flatten an Adobe PDF Portfolio in Adobe XI Pro.  The Portfolio contains emails with various attachments.  I need to produce a single PDF with all emails and attachments as "images/pages" (as they would appear when printed).  Attachments need to follow their corresponding email in order.  All links, metadata, etc. will be stripped out and various text redactions applied to the final PDF. 

    I did try to open the resulting PDF to see if the fields/annotations were flattened. How would I know if they were flattened?
    The images I added get a thin blue border around them and become shaded when I click on them after flattening.
    Before flattening, they get a thin blue border with squares on each corner to drag, change size, etc.
    Does this mean they were successfully flattened?
    I do not understand this: “I just tried with Preflight (Acrobat 9) and it made all of the check boxes selected when it flattened them.” What check boxes are you referring to?
    Please see the below window. Is that where I am supposed to be? If so, am I supposed to click “Analyze and Fix” or do something else?
    Philip Jones in post 15 suggested “Selecting All then use the Flattening.” However, that makes no difference for me.

  • Email with html body and a pdf attachment

    Hi,
    i try to send a email with html body and one attach in pdf
    in release 4.6c using the SO_DOCUMENT_SEND_API1.
    I've put the html in the txt table and the pdf in bin table but i obtain the following situation:
    1) with only the html in the body i see a right email in html
    2) with the html body AND the pdf attach i obtain a empty mail with two attach.
    what can i do ? I's possible to do this.
    Thanks in advance.

    Contact my basis guy is a problem !!
    maybe a need a function similar to SX_OBJECT_CONVERT_RAW_TXT to convert raw (containing html text) into real html ?
    my view V_SXCONV contain:
    ALI     HTM     2     SX_OBJECT_CONVERT_ALI_HTM
    ALI     PS     4     SX_OBJECT_CONVERT_ALI_PRT
    ALI     RAW     1     SX_OBJECT_CONVERT_ALI_RAW
    ALI     TXT     2     SX_OBJECT_CONVERT_ALI_TXT
    ICS     RAW     8     SX_OBJECT_CONVERT_ICS_RAW
    INT     RAW     8     SX_OBJECT_CONVERT_INT_RAW
    OBJ     HTM     2     SX_OBJECT_CONVERT_OBJ_HTM
    OTF     PCL     3     SX_OBJECT_CONVERT_OTF_PRT
    OTF     PDF     1     SX_OBJECT_CONVERT_OTF_PDF
    OTF     PS     2     SX_OBJECT_CONVERT_OTF_PRT
    OTF     RAW     9     SX_OBJECT_CONVERT_OTF_RAW
    RAW     SCR     6     SX_OBJECT_CONVERT_RAW_SCR
    RAW     TXT     7     SX_OBJECT_CONVERT_RAW_TXT
    SCR     OTF     1     SX_OBJECT_CONVERT_SCR_OTF
    TXT     INT     7     SX_OBJECT_CONVERT_TXT_INT
    URL     HTM     2     SX_OBJECT_CONVERT_OBJL_HTM
    thanks a lot.

  • Fed up with blocked emails and blacklisted IPs from Verizon

    Have been struggling with blocked emails and getting no help from Verizon.  When sending emails via Outlook, most are rejected whether we create them or just forward them.  Sometimes we get a spam notice, but most of the time they just disappear.  Have contacted Verizon support and they have changed the outgoing port number with no improvement.  They blame the signature block we attach to emails, but removing doesn't seem to improve anything.  They say we can't contact the spam people except by email, but that doesn't seem to get any response.  Meanwhile, the IPs that Verizon assigns us are on the blacklist.  Verizon says this has nothing to do with the problem, but I have to think that it does.  Would appreciate some help!

    Verizon doesn't control the blacklist at Spamhaus. The outbound spam filter has been implemented along with other measures as part of an effort to prevent that type of block for Verizon IP addresses, but until spammers are wiped from the planet, blacklisting is going to happen.
    To get off of the list, you have 2 options:
    Appeal to Spamhaus to remove your IP here. Since you have a dynamic IP address, you will have to do this every time you get a  blacklisted IP.
    -OR-
    You can get a static IP address from Verizon. This is the best solution for most businesses.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
    "All knowledge is worth having."

  • While saving multiple attachments from mail, files with same name are added and not replaced

    While saving Multiple Attachments from Mail, existing file with same name are not overwritted but new files are added in the folder.

    Bjørn Larsen a écrit:
    Hi all
    Hope to get some help with Elements Organizer.
    I have 12-15 years of digital photos that I now want to import into my newly aquirede Adobe Elements Organizer / Photoshop. Since my Nikon names the files with continous numbers from 0001 to 9999 I have multiple files with the same name although they are not alike at all. My previous software had no problems with that since I keep the photos in separate file folders based on import date. I generally import photos after each event and so name the folder with the date and some event info (e.g. 2014.12.24 - Christmas at grandparents).
    That is a common situation, I have the same limitation for files not going over 9999 on my Canons...
    Now - when I import my photos into Elements Organizer I get a lot of error messages with "same name exist .....) Hmmmmmmm
    Please sate the exact wording of the error message, I have never seen a message stating 'same name exist...' or equivalent; only messages about files already in the catalog. Files already in the catalog mean that some files have the same 'date taken' and file size in Kb.
    Any suggestions. I'm using a mac and tried to rename files based on date taken. The mac can do that but it takes ages to go into each folder and run the renaming script there.
    I also use a similar folder creation scheme (such a date naming is the default for the downloader). That way I never get a message about duplicates for the same file names.
    However - I can't be the first or only person with this problem so I figure that some workaround must be known out there. Maybe the import action can recognize date taken or - well. Thank you very much in advance if you can help me out here.
    You can alsways set the downloader to rename the imported files with a unique new name, there are many options in the 'advanced' dialog of the downloader. I don't know about Macs, but I don't thing there is a difference.

Maybe you are looking for

  • Empty Strings are converted to NULLs

    We are developing a Java application intended to work with multiple databases. We want to store empty strings but oracle converts this to NULL values. Is there a way to tell the Oracle Database not to convert the empty string to NULL and to store it

  • Mini DisplayPort to HDMI Adapter plays video but does not do Audio

    Ok I was told by someone at the Apple Store durring my one to one secession that I could get a mini to HDMI cable and the video and audio from my laptop would be displayed on the TV. This was the cable I was told to get http://www.amazon.com/gp/produ

  • Urgent request - TEXT_IO package

    Hi people, I'm in the process of converting one of my client's corporate reports to an Excel format, using the "TEXT_IO" package. The client requires his logo to appear in the Excel file (for a purely aesthetic purpose). I've tried - to no avail, mig

  • Query based on "NATURAL JOIN" statement of Oracle9i

    I have created following 4 tables create table CUST_MASTER (CUST_NO NUMBER(3),CUST_NAME VARCHAR2(20),CUST_CITY VARCHAR2(20)); create table ITEM_MASTER (ITEM_NO NUMBER(2),ITEM_NAME VARCHAR2(20), PRICE NUMBER(4)); create table ORDER_HEADER ( ORDER_NO N

  • Query payment 30 days

    good morning experts, I have a problem, how to create a Query to display customer data to the payment of more than 30 days. And are also grouped according to TOP customernya payment. In the data please also shown the value of customer transactions in