[SOLVED] Can send and receive plain text mail, but can't receive on html
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can send and receive plain text mail, but can't receive on html
I am new to Send mail. i installed it and i am able to send and receive plain text e-mails from the send mail server, but when i send a HTML e-mail, the receiver only receives plain text, it looks like the send-mail server is chopping off the HTML header, how can i enable this feature.
these e-mails are application generated, below i am listing the template of it. this goes to a send-mail server, and then we deliver it to the mail box.
<html>
<head>
<title>Mercury IT Governance Notification</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<STYLE TYPE="text/css">
<!--
body {background:#FFFFFF; color=#000000;}
A:link { font-family:Arial, Verdana, sans-serif; font-size: 11px; text-decoration:underline; color:#2E5380;}
A:active { font-family:Arial, Verdana, sans-serif; font-size: 11px; text-decoration:underline; color:#00AA94;}
A:visited { font-family:Arial, Verdana, sans-serif; font-size: 11px; text-decoration:underline; color:#2E5380;}
.notificationbold {font-family:Arial, Verdana, sans-serif; font-size:11px; font-weight:bold; padding-bottom:6; color:#000000;}
.notificationtext {font-family:Arial, Verdana, sans-serif; font-size:11px; text-decoration:none; padding-bottom:6; color:#000000;}
.notificationheader {font-family: Arial, Verdana, sans-serif; font-size: 16px; font-weight: bold; color:#635E57; width: 100%; text-align: left; vertical-align: top; padding: 15px 0px 5px 0px; border-bottom: #00AA94 2px solid;}
.notificationspace {padding-left:25px}
.notificationcolpad {padding-left:20px}
.notificationverticalspace {height: 6px}
.notificationfooter {font-family: Arial, Verdana, sans-serif; font-size: 11px; font-style: Italic; color:#00AA94; width: 100%; text-align: left; vertical-align: top; padding: 15px 0px 5px 0px; border-bottom: #00AA94 2px solid;}
-->
</STYLE>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="60%" border="0" bordercolor="red" cellspacing="0" cellpadding="0" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<tr>
<td class="notificationspace"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td class="notificationheader" colspan="2" nowrap>A '[REQ.REQUEST_TYPE_NAME]' has been submitted by '[REQ.CREATED_BY_NAME]' for your Action.<BR>Following are the Request details:</td>
</tr>
<tr>
<td height="6" colspan="2"></td>
</tr>
<!-- <tr>
<td class="notificationbold" nowrap>Notified Users:</td>
<td width="2000" class="notificationtext notificationcolpad">[NOTIF.TO_USERS]</td>
</tr> -->
<tr>
<td colspan="2" class="notificationdivider"> </td>
</tr>
<tr>
<td class="notificationverticalspace" colspan="2"></td>
</tr>
<tr>
<td class="notificationbold" nowrap>Service Request #:</td>
<td class="notificationtext notificationcolpad">[REQ.REQUEST_ID_LINK] (To Access Click on the Request#)</td>
</tr>
<tr>
<td class="notificationbold" nowrap>Priority</td>
<td class="notificationtext notificationcolpad" nowrap>[REQ.PRIORITY_CODE]</td>
</tr>
<tr>
<td class="notificationbold" nowrap>Description:</td>
<td class="notificationtext notificationcolpad" >[REQ.DESCRIPTION]</td>
</tr>
<tr>
<td class="notificationbold" nowrap>IT Support Group:</td>
<td class="notificationtext notificationcolpad" nowrap>[REQ.ASSIGNED_TO_GROUP_NAME]</td>
</tr>
<tr>
<td class="notificationheader" colspan="2" nowrap> </td>
</tr>
<tr>
<td class="notificationfooter" Colspan="2">This message is confidential, intended only for the named recipient(s) and may contain information that is privileged or exempt from disclosure under applicable law. If you are not the intended recipient(s), you are notified that the dissemination, distribution, or copying of this message is strictly prohibited. If you receive this message in error please delete this message. Thank you.<Br><br></td>
</tr>
</table>
</td>
<td class="notificationspace"></td>
</tr>
<tr>
<td height="20" colspan="2"></td>
</tr>
</table>
</body>
</html>
these e-mails are application generated, below i am listing the template of it. this goes to a send-mail server, and then we deliver it to the mail box.
<title>Mercury IT Governance Notification</title>
Based on this, you are using a commercial, PAY-FOR application. Have you contacted Kintana/HP support, since you're having a problem with emails that are generated from their application? Also, you don't say if you've actually tested your sendmail setup from anything else...have you just tried to email an html page to yourself, to see if it works, to help diagnose the problem?
And as j-ray said...if you don't send the email as an html email, it WILL only send through as plain-text.
we tried it but didn't work, we have a Microsoft exchange server also, when we changing the HP app to use that, it works fine.
i tried copying the above html in to test.html and tried it, but i get an e-mail as plain text. /usr/sbin/sendmail XXXXX@XXXXXX < test.html
i tried this echo "<b>HTML Message goes here</b>" | mail -s "$(echo -e "This is the subject\nContent-Type: text/html")" XXXXX@XXXXXX and it worked fine.
we tried it but didn't work, we have a Microsoft exchange server also, when we changing the HP app to use that, it works fine.
i tried copying the above html in to test.html and tried it, but i get an e-mail as plain text. /usr/sbin/sendmail XXXXX@XXXXXX < test.html
i tried this echo "<b>HTML Message goes here</b>" | mail -s "$(echo -e "This is the subject\nContent-Type: text/html")" XXXXX@XXXXXX and it worked fine.
And why is that surprising? Again, if you don't set the type of the email to be an HTML email, it will NOT GO THROUGH as HTML. The first one you didn't...the second one you DID. Amazingly, when you tell it you're sending an HTML email, it goes through as one. And since we don't know how your exchange server is set up, we can't guess as to why it works there.
Again, have you contacted Kintana/HP support, since you're PAYING for support from them, for this app???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.