Sent html messages become damaged

Whenever I send a message with html markup the mail received by recipients has parts missing.
A typical piece of source code of a mail received by a recipient looks like this:
<div
ord; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
After <div there suddenly is a line break and the rest of the characters that are supposed to be on that line are gone. The plain text part of the multipart message is always ok.
Errors like this typically show up 5 times in an email, this causes the message to show parts of the html code, missing text and falsely styled text.
I've always used Eudora to send messages (as plain text) and have never had any problems. I'm now using Leopard Mail (sending messages as html) and problems have started since.
The message copied to my 'sent' mailbox with IMAP doesn't show these errors, only the message sent by SMTP.

If you must send html mail rather than plain text, and it's not working right at the other end, there is not a lot you can do -- there are too many different ways such mail is handled by the different apps involved. It's not possible to guarantee correct reception of anything other than plain text (except presumably by Mail.app:-). You might try switching to another email client, like Entourage or Thunderbird.
While Mail.app has Rich Text as the default setting, I think it still normally sends Plain text unless you choose styling in the New Message pane or add stuff like signatures or attachments.

Similar Messages

  • Can I Send HTML Messages in Mail?

    I am trying to send html messages in Mail, and also to add a small html code to my signature. Is this possible? If so, how? When I put in straight code, it just remains text. I know I receive html mail, so....?

    RTf with Tiger Mail is HTML but the Mail.app does not include an HTML composer/editor.
    In order to send basic text as HTML instead of Plain Text when using RTF for message composition requires changing the font or color of existing text in a new message and/or when selecting bold, underline or italic for a word or a portion of existing text. This part I don't understand since selecting RTF for message composition should send the font and font size selected under Fonts & Colors for the Mail.app preferences as HTML by itself.
    You can use an HTML editor/composer of choice (Apple's Text Edit application can be used for this) and save the completed HTML document. Open the saved HTML document with Safari and after confirming the layout, etc. with Safari, at the menu bar go to File and select Mail Contents of This Page and the rendered page with Safari will be copied to a new Mail.app message which will be sent in its entirety.
    You can set up a "template" this way by saving the HTML message as a Draft. Utilize a user created "On My Mac" location mailbox named Templates and transfer this message from the account's Drafts mailbox to the Templates mailbox. Select this templates message and at the menu bar, go to Message and select Send Again entering all recipients and making any changes, etc. The original template message will not be altered.
    Regarding creating a Mail.app signature with HTML code, check this link.
    http://allforces.com/2006/04/14/css-signatures/
    Don't know for sure at this point but it appears this may become easier with the Mail.app under Leopard.
    http://www.apple.com/macosx/leopard/mail.html

  • Problem with replies in Maverick's mail.  Originating emails send fine.  When replying to an email (various addresses) the reply is hung up and can not be sent.  Option becomes put in draft, delete, etc.  Any suggestions would be helpful

    Problem with replies in Maverick's mail.  Originating emails send fine.  When replying to an email (various addresses) the reply is hung up and can not be sent.  Option becomes put in draft, delete, etc.  Any suggestions would be helpful.  Mid 2013 iMac.

    I don't know how rare this is.  I went a week or so without a problem, and now it's starting to recur.  Also, in some instances, an email will look unsent (remain in the outbox on the Treo), but it has been sent, and recipients are replying while I'm trying to figure out what is going on.  Further, it will send the same email over and over during this madness.
    This is a show stopper.  If there isn't a software fix soon, I may chuck this phone in the garbage.
    Post relates to: Treo 800w (Sprint)
    UPDATE:  The problem comes and goes.  The next day, no changes to the treo, everything workeds.  Now i'm suspecting the sprint server, and how it/the phone responds from failing to send while roaming.  I've since turned off roaming, and haven't had a problem for several days.
    Message Edited by slrichardson on 12-22-2008 01:12 PM

  • Using images in an HTML message

    Dear All,
    I want to embed 2 .gif files as part of the HTML message which is being sent from one client to another..My clients want me to give them the same effect as Outlook express utility: New Using->Select Stationery->Filename...so that the text can be typed on the image & then sent...i have hardcoded the structure of the message but the problem is that i am only able to send this message & view it only on my m/c & my e-mail id....if i send it to some other id the picture is not displayed how do i handle this
    Thank You
    Chaitra

    import java.io.*;
    import java.util.*;
    import java.text.*;
    import javax.mail.*;
    import javax.servlet.*;
    import javax.activation.*;
    import javax.servlet.http.*;
    import javax.mail.internet.*;
    public class MailServlet
    extends HttpServlet
    protected void printForm(String form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws IOException
    PrintWriter writer = response.getWriter();
    form = MessageFormat.format(form,
    new Object[] { request.getServletPath() });
    writer.print(form);
    writer.flush();
    protected void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException
    printForm(request.getParameter("SendMailForm"),request,response);
    protected void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException
    try
    if(request.getContentType().
    startsWith("multipart/form-data"))
    doUpload(request,response);
    else
    response.sendError(
    HttpServletResponse.SC_NOT_FOUND);
    catch(Exception e)
    PrintWriter writer = response.getWriter();
    writer.println("<HR><B>Oops!</B><PRE>");
    e.printStackTrace(writer);
    writer.println("</PRE>");
    writer.flush();
    protected void doSendMessage(HttpServletRequest request,
    HttpServletResponse response,
    Dictionary fields)
    throws IOException, MessagingException
    String host = "10.10.40.6";
    Properties props = System.getProperties();
    props.put("mail.smtp.host", host);
    Session session =
    Session.getInstance(props, null);
    Message msg =
    new MimeMessage(
    session); /*.getDefaultInstance(
    System.getProperties(),null));*/
    msg.setFrom(
    new InternetAddress(
    (String)fields.get("from")));
    InternetAddress[] tos =
    InternetAddress.parse((String)fields.get("to"));
    msg.setRecipients(Message.RecipientType.TO,tos);
    if(fields.get("cc") != null)
    InternetAddress[] ccs =
    InternetAddress.parse((String)fields.get("cc"));
    msg.setRecipients(Message.RecipientType.CC,ccs);
    msg.setSubject((String)fields.get("subject"));
    msg.setSentDate(new Date());
    String msgText ="<HTML><HEAD><TITLE id=ridTitle>Eximbirthday</TITLE>";
         msgText+="<META http-equiv=Content-Type content=\"text/html; charset=windows-1252\"><BASE ";
         msgText+="href=d:/Tomcat/webapps/Project/>";
         msgText+="<META content=\"MSHTML 6.00.2600.0\" name=GENERATOR></HEAD>";
         msgText+="<BODY id=ridBody bgColor=#e7e4d9 leftMargin=0 topMargin=0 marginheight=0";
         msgText+="marginwidth=0>";
         msgText+="<CENTER></CENTER>";
         msgText+="<P></P>";
         msgText+="<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>";
         msgText+="<TBODY>";
         msgText+="<TR>";
         msgText+="<TD vAlign=top align=left colSpan=2><IMG height=69 src=\"cid:hbday.gif\"";
         msgText+="width=366 border=0></TD></TR>";
         msgText+="<TR>";
         msgText+="<TD vAlign=top align=left width=\"65%\" height=2>";
         msgText+="<br><br><FONT color=#0000ff size=5>";
         msgText+=(String)fields.get("body");
         msgText+="</font></TD>";
         msgText+="<TD vAlign=bottom align=right height=2><IMG height=394 src=\"cid:flowers.gif\"";
         msgText+="width=296 border=0></TD></TR></TBODY></TABLE>";
         msgText+="<DIV> </DIV></BODY></HTML>";
         if(null == fields.get("attachment"))
    // msg.setText((String)fields.get("body"));
              msg.setContent(msgText,"text/html");
    else
    BodyPart body = new MimeBodyPart(),
    attachment =(BodyPart)fields.get("attachment");
    //body.setText((String)fields.get("body"));
              // body.setHeader("Content-Disposition", "inline; filename=flowers.gif");
              body.setContent(msgText, "text/html");
    MimeMultipart multipart = new MimeMultipart("related");
    multipart.addBodyPart(body);
    multipart.addBodyPart(attachment);
              body=new MimeBodyPart();
              DataSource fds = new FileDataSource("D:/Tomcat/webapps/Project/hbday.gif");
              body.setDataHandler(new DataHandler(fds));
    body.setHeader("Content-ID","hbday.gif");
         // Add part to multi-part
         multipart.addBodyPart(body);
              // Create 2nd part for the image
         body = new MimeBodyPart();
              // Fetch the image and associate to part
              DataSource fds2 = new FileDataSource("D:/Tomcat/webapps/Project/flowers.gif");
              body.setDataHandler(new DataHandler(fds2));
              body.setHeader("Content-ID","flowers.gif");
              // Add part to multi-part
              multipart.addBodyPart(body);
    msg.setContent(multipart);
    Transport.send(msg);
    response.sendRedirect(response.encodeRedirectURL("/Project/OkForm.jsp"));
    public void doUpload(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, MessagingException
    String boundary =
    request.getHeader("Content-Type");
    int pos = boundary.indexOf('=');
    boundary = boundary.substring(pos + 1);
    boundary = "--" + boundary;
    ServletInputStream in =
    request.getInputStream();
    byte[] bytes = new byte[512];
    int state = 0;
    ByteArrayOutputStream buffer =
    new ByteArrayOutputStream();
    String name = null,
    value = null,
    filename = null,
    contentType = null;
    Dictionary fields = new Hashtable();
    int i = in.readLine(bytes,0,512);
    while(-1 != i)
    String st = new String(bytes,0,i);
    if(st.startsWith(boundary))
    state = 0;
    if(null != name)
    if(value != null)
    fields.put(name,
    value.substring(0,
    // -2 to remove CR/LF
    value.length() - 2));
    else if(buffer.size() > 2)
    InternetHeaders headers =
    new InternetHeaders();
    MimeBodyPart bodyPart =
    new MimeBodyPart();
    DataSource ds =
    new ByteArrayDataSource(
    buffer.toByteArray(),
    contentType,filename);
    bodyPart.setDataHandler(
    new DataHandler(ds));
    bodyPart.setDisposition(
    "attachment; filename=\"" +
    filename + "\"");
    bodyPart.setFileName(filename);
    fields.put(name,bodyPart);
    name = null;
    value = null;
    filename = null;
    contentType = null;
    buffer = new ByteArrayOutputStream();
    else if(st.startsWith(
    "Content-Disposition: form-data") &&
    state == 0)
    StringTokenizer tokenizer =
    new StringTokenizer(st,";=\"");
    while(tokenizer.hasMoreTokens())
    String token = tokenizer.nextToken();
    if(token.startsWith(" name"))
    name = tokenizer.nextToken();
    state = 2;
    else if(token.startsWith(" filename"))
    filename = tokenizer.nextToken();
    StringTokenizer ftokenizer =
    new StringTokenizer(filename,"\\/:");
    filename = ftokenizer.nextToken();
    while(ftokenizer.hasMoreTokens())
    filename = ftokenizer.nextToken();
    state = 1;
    break;
    else if(st.startsWith("Content-Type") &&
    state == 1)
    pos = st.indexOf(":");
    // + 2 to remove the space
    // - 2 to remove CR/LF
    contentType =
    st.substring(pos + 2,st.length() - 2);
    else if(st.equals("\r\n") && state == 1)
    state = 3;
    else if(st.equals("\r\n") && state == 2)
    state = 4;
    else if(state == 4)
    value = value == null ? st : value + st;
    else if(state == 3)
    buffer.write(bytes,0,i);
    i = in.readLine(bytes,0,512);
    doSendMessage(request,response,fields);
    class ByteArrayDataSource
    implements DataSource
    byte[] bytes;
    String contentType,
    name;
    ByteArrayDataSource(byte[] bytes,
    String contentType,
    String name)
    this.bytes = bytes;
    if(contentType == null)
    this.contentType = "application/octet-stream";
    else
    this.contentType = contentType;
    this.name = name;
    public String getContentType()
    return contentType;
    public InputStream getInputStream()
    // remove the final CR/LF
    return new ByteArrayInputStream(
    bytes,0,bytes.length - 2);
    public String getName()
    return name;
    public OutputStream getOutputStream()
    throws IOException
    throw new FileNotFoundException();
    This is the latest version ....which again doesnt work!!!!!
    Thanx..
    Chaitra

  • Importing from Eudora problems - html messages being displayed in plain text and problems with attachments

    Hello,
    I hope you can help me. I've imported all my emails from Eudora into Outlook 2010 but I have a couple of problems.
    All emails that I've imported which had attachments with them have a notice on them saying the attachment has been blocked. I can always browse to the folder whereb my old attachments are stored, but this is still inconvenient.
    Secondly, all my messages that I've sent in the past (html) are being displayed in plain text, which is making them difficult to read because of all the html tags being displayed.
    Also with emails that I've sent in the past- there is no record of any attachments being sent with messages which I know had attachments with them.
    Any ideas? I've trawled google and had no luck except finding programs that cost $70 that can import everything properly.
    David

    David:
    I know this is a very old thread, but did you every figure out a way to fix the formatting of imported Eudora mail?
    I just "upgraded" from Eudora to Outlook 2010 ...
    and have 10 years worth of HTML formatted e-mail that now shows up as plain text with embedded html formatting ...
    apparently it is a long-running problem that has roots in the way Eudora formats messages ...
    Outlook and other e-mail clients all seems to have issues with importing and do not properly recognize HTML-formatted messages from Eudora ... very sad that I can no longer really "read" my old e-mail at this point ...  :-(
    See closing paragraphs here:   http://its.uiowa.edu/support/article/2800
    Same problem over at Mozilla going back 10+ years ... not sure if they fixed it..........
    https://bugzilla.mozilla.org/show_bug.cgi?id=3157

  • KNOWN ISSUE: HTML Messages with plain-text signatures

    To get around the EAS security policy issue, I'm having non-sensitive emails from work forwarded to a GMail account from a redirect set up in our corporate OWA. The redirect seems to send the messages to GMail without any issues; formatting is 100% intact, and in the GMail web client as well as Thunderbird, Entourage, etc., HTML emails with plain-text signature attachments show the plain-text message inline with the rest of the formatted message. All of our internal mailing lists have these plain text attachments that say where the message was coming from (Message sent from [email protected] by listserv). These get affixed to every message, both plain text and HTML.
    Here's my problem: The Pre's email client handles both plain text and HTML messages beautifully. But, when I receive a message from a mailing list with a plain text attachment, the HTML portion disappears, and all I see is the signature.
    Is there any way to make the Pre show the HTML INSTEAD of the plain text? I can live without the sig, I know where the messages are coming from already. But if I can't read the message, it's useless. I've only begun researching this and so far Google hasn't been much help, nor has searching these or other forums. Any help would be appreciated.
    Palm Pre P100EWW
    Post relates to: Pre p100eww (Sprint)
    Message Edited by HowellBP on 06-16-2009 04:13 PM

    1-51626418773
    I just got off the phone with Palm Support. Apparently this is a bug in the mail application. It currently does not support parsing both HTML and plain text in the same message. It will read EITHER plain text OR HTML, but not both at the same time. This will be fixed in a future update.

  • How to send Html message in this procedure?

    Hi all,
    here is one procedure
    DECLARE
    v_connection UTL_SMTP.CONNECTION;
    BEGIN
    v_connection := UTL_SMTP.OPEN_CONNECTION('mail.idealake.com',25);
    UTL_SMTP.HELO(v_connection,'mail.idealake.com');
    UTL_SMTP.MAIL(v_connection,'[email protected]');
    UTL_SMTP.RCPT(v_connection,'[email protected]');
    UTL_SMTP.DATA(v_connection,'Sent From PL/SQL');
    UTL_SMTP.QUIT(v_connection);
    END;
    I want to send html message throug this procedure.
    Please tell me tjhe solution.
    Thanks in advance.
    Prathamesh.

    I also have a copy of send mail package (modified copy of some code that I found on the net). Originally written with utl_smtp. Converted it to utl_tcp. Supports binary file attachments and formatted html messages now.
    You can pick it up at my website... http://www.myoracleportal.com

  • Composing an html message

    I wasn't able to find the answer for this question in the archives - there seemed to be a link which was no longer accessible.
    I'm trying to compose an email to send out to my clients; I wanted to use html to make it pretty, add links, photos, etc. I composed it using BBEdit, opened it in IE and everything looks great. However, if I copy and paste the html into mail and send it along to myself as a test, it just comes through as code, not images and rich text (and yes, I have that selected).
    The one relevant topic I found made it sound like Mail users can't compose html emails? But this seems really wack to me, especially as all html messages I receive in Mail come through in lovely color.
    Any ideas?

    hi, Allan, thanks for your help.
    I see what you and Apple are saying about html and its accessibility problems (as well as people not wanting to receive advertisements in their email), BUT I myself subscribe to many newsletters, etc. via my email account (downloaded to Mail), and enjoy getting graphics, formatting, colors, links etc. in html format. Much more interesting and energetic than standard text.
    And I find it hard to believe that it's impossible for me to do something similar, on a very small, personal basis, to give my small business some flair, using Mail.
    It has been recommended that I open a gmail account and use their capabilities to send html compositions to my clients. Which I am not thrilled about. I know everyone receives html messages differently, and some end users will end up with just code (similar to what I see when I check my POP email account via their webmail and not Mail), but obviously many companies are using html composition in some capacity without major problems. It seems strange that Apple would tell its customers they can't do that - sending them to Gmail or a Microsoft program for it?
    Oh, and I usually do use Safari - IE is the default set for the "view in browser" action in my BBEdit (which, you're right, would be a good idea to update).
    I don't have Tiger yet so I'm not totally clear on your recommendation - are you saying that once I get Tiger Mail, I will be able to copy and paste from BBEdit to a Mail message and send it, resulting in prettily formatted html messages sent? (regardless of how the end user views them) Or is it just through Safari (which would also work fine).
    And there's no way people want to receive newsletters and updates in a PDF file form, I can tell you that right now. Attachments make people (especially PC users!) nervous.
    I suppose I can try using a friend's Tiger Mail program to send email in the way I am trying to (through Safari). Seems like a lot of hassle, but that's progress for you.
    emac   Mac OS X (10.3.9)  
    emac   Mac OS X (10.2.x)  
    emac   Mac OS X (10.2.x)  

  • HTML Message

    I'd like to send a message (MS Outlook called it HTML message) with special effects such as bold, italic and the other font. How could I do this?
    Thanks,
    Charles

    Hi Bob,
    Thanks for your message. I sent out two new messages to myself. I wrote one sentence without bold or italic in a message and two sentences in the other in which the first one was no bold and italic (just typed one sentence) and the second was with bold and italic.
    The first resulting message was in plain text. Raw source indicated the second message contained plain text for the first sentence and html (formatted) text for the second sentence.
    In other words, html is in effect only if there is any format in the message. Even you pre-set rich text, you still have to do some format (such as bold).
    Do you get the same result?
    With my result, rich text message is not really a rich text message.
    Charles

  • How to sent a message or notification to PCs on LAN using Powershell

    i want to sent a message to list of PCs on LAN, how to do that, thanhk u

    http://ss64.com/nt/msg.html
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • In Mail 3.6 remote images in HTML messages display as blue squares with ? even though checked in viewing references.

    In Mail 3.6 remote images in HTML messages display as blue squares with ? even though checked in viewing references.

    Nurit,
    The point is that that button should not be there, if the preference setting is as you say. This indicates the preference setting is stuck, and that is what I was trying to help you resolve.
    The full purge is done as follows:
    Quit Mail, and in the Finder open Home/Library and locate the Mail folder. Control-click over the Mail folder, and choose Duplicate -- then drag the resulting copy to the Desktop for temporary backup. Next, open Home/Library/Preferences and find the com.apple.mail.plist file and drag it to the desktop.
    Relaunch Mail, which will open as though new, and when prompted to import anything DECLINE. Instead, re-enter your account info, and Mail will re-discover the account folders for your accounts, and all should be well, after setting preferences as you desire.
    Ask any needed questions, and keep us posted.
    Ernie

  • HTML messages crash Mail

    Since this morning, every time I try to open an HTML message in Mail, it crashes. I don't have a problem with regular text e-mails, just HTML. I've repaired permissions, run Disk Utility and Disk Warrior, and I don't know how to proceed.
    Can anyone help, please?

    Hi lsgmilano, and a warm welcome to the forums if you han't been already!
    First I'd backup your whole Mail folder, by right clicking on it in the Finder, then choose Archive/Compress.
    Right click on that Mail folder, choose archive, you'll get everything in the folder, and the folder itself in a file called Mail.zip..
    Quit Mail, then In your home folder, try moving this +folder & file+ to the Desktop then reboot...
    /Users/YourUserName/Library/Caches/Mail
    Move to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index

  • In my haste i sent a message to "erase ipod touch" on find my iphone when iI lost my lost ipod touch. Can I reverse that? Anthony

    In my haste i sent a message to "erase ipod touch" on find my iphone when iI lost my lost ipod touch. Can I reverse that?
    Thanks in advance,
    dizzysaxy

    Sort of if you can get hold of the iPod before it is erased, turn wifi off, then backup the iPod, turn wifi on and let it erase. Then restore from backup.

  • Hi there. I have the iphone 4. Since updating to ios 6, the sent text message sound no longer "plays"! Is there any way of turning it back on? Thanks.

    Hi there. I have the iphone 4. Since updating to ios 6, the sent text message sound no longer "plays"! Is there any way of turning it back on? Thanks.

    Hi there. I have the iphone 4. Since updating to ios 6, the sent text message sound no longer "plays"! Is there any way of turning it back on? Thanks.

  • Why every time i hit my new message or iMessage notification it goes and creates a new message to the person who sent the message

    why every time i hit my new message or iMessage notification it goes and creates a new message to the person who sent the message?

    Hey Rkbethel
    There are two ways to resolve this for you. For the first is go and do a Reset All Settings by going to Settings > General > Reset > Reset All Settings. It will not delete anything on your iPhone, but it will put all settings back to default. If it does not work, the next step would be to restore the iPhone back to factory settings.
    iTunes: Restoring iOS software
    http://support.apple.com/kb/ht1414
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

Maybe you are looking for