- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mailx cannot send special characters in subject
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2009 07:57 AM
02-04-2009 07:57 AM
I'm trying to send email by using mailx, but three scenarios arise:
Scenario 1
----------
I send an email including US-ASCII chars only ( no special chars ) in its body message, but including them ( special chars ) in the subject - In this case the body msg is well interpreted, but the subject appears scrambbled
Command:
echo "aeiou" | mailx -s "áéíóú" email_address
Results:
Content: (correct) - aeiou
Subject: (wrong) - =?iso88591?Q?=E1=E9=ED=F3=FA?=
Scenario 2
----------
I send an email including special chars only ( no special chars ) in its body message, but not in the subject - In this case everything is correct.
Command:
echo "áéíóú" | mailx -s "aeiou" email_address
Results:
Content: (correct) - áéíóú
Subject: (correct) - aeiou
Scenario 3
----------
I send an email including special chars in its body message, and subject - In this case, everything correct.
Command:
echo "áéíóú" | mailx -s "áéíóú" email_address
Results:
Content: (correct) - áéíóú
Subject: (correct) - áéíóú
Summary:
--------
When the body messages has any special character, the subject is well interpreted when including special chars on it, but it's not when the body message doesn't have it, and subject does.
Current settings:
-----------------
LANG=es_MX.iso88591
LC_CTYPE="es_MX.iso88591"
LC_COLLATE="es_MX.iso88591"
LC_MONETARY="es_MX.iso88591"
LC_NUMERIC="es_MX.iso88591"
LC_TIME="es_MX.iso88591"
LC_MESSAGES="es_MX.iso88591"
LC_ALL=
Terminal type allows to type special chars.
stty cs8 -istrip
.mailrc's contents:
set sendcharsets=iso88591
set charset=iso88591
set encoding=8bit
Could you help me to do the correct setup for sending email by using mailx, and have both (body message, and subject) well interpreted in all scenarios, please ?
Thanks in advance.
LeMike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2009 08:11 AM
02-04-2009 08:11 AM
SolutionLets eliminate mailx as an issue.
Try this script instead and see if you get the same results.
http://www.hpux.ws/?p=7
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2009 09:00 AM
02-04-2009 09:00 AM
Re: mailx cannot send special characters in subject
Put the email in a file in the format
To: user@domain
From: user@domain
Subject: some subject
message text
Then call sendmail with the following options:
/usr/lib/sendmail -vt < filename
The -t tells sendmail to read the file for its header information. You can add MIME headers to make it a html formatted email etc...
To make it a html formatted email just add these two headers:
MIME-Version: 1.0
Content-Type: text/html
and change your message body to be some valid html code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2009 12:47 PM
02-04-2009 12:47 PM
Re: mailx cannot send special characters in subject
Although It's also interesting why sending email with the special chars in its body msg causes the email to correctly interpret the charset to use.
Best Regards,
Sincerely,
LeMike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2009 09:24 PM
02-04-2009 09:24 PM
Re: mailx cannot send special characters in subject
That =?iso88591 is how a fancy mail client encodes your special chars. mailx isn't a fancy client so it doesn't format it.