From:, To: and Subject: end up in email body - html email using sendmail

To the experts and the experienced:
I am trying to send email in html format from a Korn shell script on Solaris 10. The
email does get delivered and is displayed html-formatted, except that the From:, To: and
Subject: lines are displayed in the email body, rather than in the email header. I
would appreciate it very much if experts and the experienced could shed some light.
I use this command line to send the email:
sendmail -t [email protected] < testmail
The content of the testmail file is as follows:
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="frontier"
--frontier
Content-Type: text/plain
From: [email protected]
To: [email protected]
Subject: test html email
This is a plain-text email.
Newman
--frontier
Content-Type: text/html
From: [email protected]&lt;br/&gt;
To: [email protected]&lt;br/&gt;
Subject: test html email&lt;br/&gt;
&lt;h3 align="center"&gt;This is a html email&lt;/h3&gt;
&lt;p&gt;This is the paragraph.&lt;/p&gt;
&lt;p&gt;Newman&lt;/p&gt;
frontier\
The email received in Microsoft Outlook (html-formatted), looks like this:
From:         [email protected]
To:
Subject:
From: [email protected]
To: [email protected]
Subject: test html email
<h3 align="center">This is a html email</h3>
<p>This is the paragraph.</p>
Newman
Two things in the email need fixing:
1. All the From:, To: and Subject: lines are treated as part of the email body and are
displayed in the email body, rather than in the header as I wanted them to.
2. The From: line in the email header is the actual sender, not the Bursar.Office as I
put in the testmail file. This can be easily done when using SMTP (telnet to port 25)
or mailx.
How do I tell sendmail/the email client to display in the intended places the From:,
To: and Subject: information that I specified in the testmail file?
Many thanks!
Newman

I searched in google and found a solution:
mailx -r [email protected] -s "test html email
content-type: text/html" john.doe < testmail
The testmail file is a pure html file with one <html></html> element. The content embedded in this element is the body of the email, with all the usual tags you would like to use: <head>, <style>, &lt;h3&gt;, &lt;p&gt;, &lt;ul&gt;, etc.
The trick is piggy-backing a content-type with the subject. It seems to me this it to get the content-type into the email header rather than into the body. And that was exactly the problem I had.
The command lines was executed on Solaris 10. It works.
Hope this could be useful to someone who would encounter the same problem.
Newman

Similar Messages

  • HT2500 Apple Email "From," and "Subject" lines do not match body of email

    After on and off problems with the imap server in iCloud the past couple weeks that prevented me from getting my .mac mail anywhere other than on the iCloud website, my inbox has morphed into a jumble of miss-matched Email Subject, From/Sent by, and Email Body.  In other words I will double click on an email that appears to be from my niece, but when it opens it is actually an email from Amazon - or someone else!  I am done with MAIL, but need HELP restoring my inboxes.  I have "Rebuilt" all inboxes but it didn’t repair the problem.  I have since switched to Outlook client for Mac and the problem does NOT occur with Outlook. 
    Ideas?

    I was able to repair this by deleting a specific file - more to come.  I did not have to do a complete restore.
    I will check for my notes and let you know how I fixed the problem.
    I think there is a good chance that Outlook mail for Mac may have been part of the problem.  It requred a rebuild (pulling data from Mail?)

  • Gmail / apple mail, assuming mavericks upgrade issue. Messages from/to and subject header do not match displayed message

    Hi Everyone
    Hoping someone has had a similar issue and can help me sort it out.
    Since Upgrading to mavericks a few weeks ago, I notice the follwoing issue in my apple mail when searching older messages (newer ones seem fine at the moment).
    A lot ( I cant say all, but quite a few well into the 80-90% plus of messages sent pre update) have gotten scrambled. I can search from/ to and subject headers, and they correspond with each other. But when i select the message Im looking for, the message desplayed is from a different sender (with a diferent subject)
    Ex I search for JohnDoe (happens if i use search function or just go manually looking thru folders) and subject "Quote", Message comes up (or I find as in manual search). When i select the message the message displayed is not the correct one. Its From JaneDoe with a subject "Thanksgiving" and its message.
    Obviously making it a little tricky to track down previous emails.
    My mail provider is Gmail (which I have heard mavericks / apple mail have been having lots of issues with).
    Hopeefully someone knows what I can do
    Thanks
    BigRed81

    Hello BigRed81,
    I have a question on this subject.  I am having the same issue.  I followed the link to the support page for rebuidling a mailbox.  It states :
    "When you rebuild mailboxes for IMAP and Exchange accounts, locally stored messages and attachments are discarded, and the messages and attachments are downloaded again from the server to your Mac. Your mailbox appears empty until the download is complete."
    I use gmail just for my Inbox.  I pull off all of my messages from the server by filing them on my mac.  So my concern is if I rebuild a mailbox, my mail account is gmail imap, and I do not have copies of my emails on the gmail server anymore that I will lose the majority of my mail because there is nothing to download again. 
    Do you know if this will happen?  Or I should not be concerned?
    Thanks
    Mykol

  • Downloaded a song from itunes and it ends almost 2 minutes early and skips to next track

    downloaded a song from itunes and it ends almost 2 minutes early and skips to next track. I deleted the song and redownloaded it from the purchased section on the itunes store three times and still have the same problem. What is the solution?

    Clear your web browser's cache, use Edit > Preferences > Advanced and tap the Reset cache button, delete the contents (if any) of ...\iTunes Media\Download, then try again.  If the problem persists contact the iTunes Store support staff through the report a problem links in your account history.
    tt2

  • TS3198 I am from Brazil and I'd like to unlock my phone to use a local carrier. Is it possible?

    I am from Brazil and I'd like to unlock my phone to use a local carrier. Is it possible?

    How would we know?  Call your carrier and ask.  They're the ones locking it.  They'd be the ones to unlock it.

  • How can i unlock my iPhone 4s i bought off from eBay and is Verizon im current oversea i want to use a local sim card

    how can i unlock my iPhone 4s i bought off from eBay and is Verizon im current oversea i want to use a local sim card

    First you'd have to establish service with Verizon. Once a paying customer in good standing, you can then request the GSM portion be unlocked. Obviously, you can't do any of that stuff while you're out of the US. They will not unlock the CDMA side.

  • From Field and Subject Overlap In Mail.app

    I am getting an overlap of the From and Subject fields. This first appeared after my upgrade to Lion. At first I thought it was a font issue, since that's what the forums have indicated. I found no duplicate fonts and Helvetica (i assume this is Helvetica, but not too savvy with fonts) appeared to be in the Font Book in all of its iterations. I'm now curious because I have a new iMac with a factory installation of Lion and have the exact same issue. Occasionally what was overlapped displays correctly, but I have not found a correlation with any other actions that would have made it do so. This appears in the new Lion veiw and in Classic View. It also overlaps when double clicking to open the message in a new window. 
    I was unable to find any relevant posts dated after 2008. I would appreciate any ideas, however far-fetched.
    OS 10.7.1
    Build 11B26
    Mail 5.0 (1244.2/1244.3)

    If you name email folders like that in many programs, it will create two folders (or more)
    It assumes it's a path, just like an operating system does when typing a path.
    If you don't want that, you can name it:
    Misc-Apple or the like.
    Misc/Apple creates two folders, in succession.

  • I found my old classic  ipod after 5 years and I wanted all the music from it , and it ended up restoring it and everything is now gone :( is there anyway I can get them back ??

    I found my old classic ipod after 5 years and I wanted all the music from it , and I plugged it onto my computer and it ended up deleting everything how can or can I retreve them ?

    The Restore erases the iPod's hard drive, so the song files are gone. 
    It is like an external hard drive (if you set the iPod to Enable disk use), so standard data recovery utilities may (?) allow you to recover erased data, like you might from a regular external hard drive.

  • How to edit email body of email subscription and how to subscribe to a IR private group by report

    hi,
    I am new to oracle Apex and I need help in finding how I can customize the email body of the email subscription of IR. Also when a user creates a private/public report in IR using group by in IR and subscribe to it, they are getting report without group by as htm attachment in email subscription. can you please help me know how I can prevent this??

    hi,
    anybody please help me with this. I am still looking out for help/answers..

  • I am from US and am visiting Germany. Is FaceTime free to use internationally?

    I Am from US and I'm visiting Germany. Is FaceTime free internationally?

    Free 24/7, anytime, anywhere As long as youre on Wifi. If youre using Cellular data you have to pay for what you use. i.e. get a plan, and if you go over your alloted data you have to pay overages. or if its a pay-per-use type of plan youll have to pay for the Cellular data you use.

  • How to read the configuration for SAP GUI elements in Plant Maintenance module from SPRO and leverage the same in NWBC for HTML.

    Dear Members,
    Greetings for the day!
    I am working on NWBC for HTML in Plant Maintenance module.
    We have configured some changes in SPRO for customizing the UI elements( like visibility, mandatory ) like tabs and fields in transactions like IW21( Create Notification).
    As of now separate parallel configuration needs to be carried out in NWBC for HTML in PM module to achieve the same UI features for creating notifications and this is time consuming.
    Is there any way to read the configuration done in SPRO for the SAP GUI's and leverage the same in NWBC for HTML.
    Appreciate your time in responding to this.
    Thanks & Regards,
    Ram.

    >
    <IfModule mod_weblogic.c>
    WebLogicCluster 127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7003,127.0.0.1:7103,127.0.0.1:7104
    MatchExpression /app1
    </IfModule>
    <Location /weblogic>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
    DebugConfigInfo ON
    PathTrim /weblogic
    </Location>
    <IfModule mod_weblogic.c>
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    MatchExpression /app2
    </IfModule>
    <Location /weblogic>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    DebugConfigInfo ON
    PathTrim /weblogic
    </Location>
    >
    This configuration is weird little bit. There is MatchExpression /app1 and MatchExpression /app2 and at the same time two <Location /weblogic> sections. Are you sure you understand what that configuration stands for?
    Try something like this ...
    <Location /app1>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
    DebugConfigInfo ON
    </Location>
    <Location /app2>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    DebugConfigInfo ON
    </Location>
    where /app1 and /app2 are contexts of your weblogic applications.
    http://download.oracle.com/docs/cd/E11035_01/wls100/plugins/apache.html
    http://httpd.apache.org/docs/2.0/mod/core.html#location

  • Unable to attach address from address book, from, to and subject greyed out

    Mozila Thunderbird
    I have just updated my copy to the latest version and after a few days of perfect use I am now unable to use my address book with an outgoing message.
    When I go in to the ‘Write’ the To:, Subject and all other areas to enter addresses are blank. When I try to double click on the address from the contact addresses nothing happens. When I click in the To: row and other rows, they become clear to enter names but not from any of my address books.

    Goto "WRITE"
    *Right click on the Menu > Choose "Customize"
    *Drag and Drop the Contact to the Menu.
    Check the Contact and it enables in left sidebar.
    *Search for the email
    *Double click on the Name/Email to add the "Write : To/CC/BCC"
    (or)
    *Right click on the Name/Email, it list the option to ADD

  • From: Sent: and Subject: are BLANK when replying - Office Outlook 2007

    Just started happening today. I'm not sure what caused it and I'm not sure how to fix it. 
    Nothing has changed on the system (That I am aware of) and there no unusual addons and it happens even when entered in /safe mode.
    Microsoft MCSA, VMWare VCAP-DTD, Cisco CCNP, CompTIA A+, Security+, Network+, Apple ACMT, SPR

    Hi,
    Is this issue reproducible on OWA? This determines if the problem is Outlook specific or related to Exchange.
    How about creating a new profile to setup the account? Test if this works fine:
    http://support.microsoft.com/kb/829918/en-us
    Regards,
    Melon Chen
    TechNet Community Support

  • HT201441 i bought an iphone from craigslist and i wasnt able to get the persons email to disable this device from his account...please help

    Please help...because now im stuck with a phone i cannot use.

    mike350z wrote:
    ... now im stuck with a phone i cannot use.
    Sorry... not much anyone here can do...
    Activation Lock in iOS 7  >  http://support.apple.com/kb/HT5818

  • I am downloading a tv series from iTunes and it is a long process, can I otherwise use my MacBook pro?

    I am downloading a tv series from iTunes.  It is taking a long time.  Can I otherwise use my Mac or will it mess up my download?  don't want to lose my money!

    Yes, I mean that, and no emailing or chatting or other network related activity. Unless of course you have a super-fast internet connection, and the slow download is 'cos the server sending it is very slow.

Maybe you are looking for