LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-17-2013, 10:28 AM   #1
pravada
LQ Newbie
 
Registered: May 2013
Posts: 8

Rep: Reputation: Disabled
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.

thanks for your reply.

-Pradeep
 
Old 05-18-2013, 03:25 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
Did you set the content-type of the email? If you copy a sample mail command it will be easier to help you.
 
Old 05-20-2013, 10:48 AM   #3
pravada
LQ Newbie
 
Registered: May 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
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">&nbsp;</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>
 
Old 05-20-2013, 10:56 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by pravada View Post
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.
 
Old 05-20-2013, 11:37 AM   #5
pravada
LQ Newbie
 
Registered: May 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-20-2013, 12:04 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by pravada View Post
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???
 
Old 05-20-2013, 03:25 PM   #7
pravada
LQ Newbie
 
Registered: May 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
thank you for the response.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can send but no receive mail nad4 Linux - Server 9 06-26-2009 02:58 AM
Postfix : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 07:31 PM
Why can't I receive or send mail unless jobesd Linux - General 0 12-05-2001 10:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration