The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mailx question melanie_pfefer Shell Programming and Scripting 2 01-24-2008 10:20 AM
MAILX question dkranes Shell Programming and Scripting 3 10-31-2007 11:24 AM
mailx and uuencode question ssmiths001 Shell Programming and Scripting 1 10-21-2005 06:43 AM
mailx question greenguy5 UNIX for Dummies Questions & Answers 1 10-21-2005 04:07 AM
Mailx question Olivier UNIX for Advanced & Expert Users 3 08-26-2002 12:21 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-23-2007
Felix2511 Felix2511 is offline
Registered User
  
 

Join Date: May 2007
Location: Madrid,Spain
Posts: 20
Question on mailx

Hello there:

I want to send an e-mail from AIX using mailx.
I'm executing the following script (-> witch doesn't work's):

-----------------------------------------------
#!/bin/sh

echo "<html><body><a href="http://www.myhomepage.com">Link</a></body></html>" >> LOG
sleep 5
! mailx -s "Test Mail HTML Link" mymail@myhomepage.com < LOG

# Return 0 for success, non-zero for errors

exit $RETURN_STATUS
------------------------------------------------
What i want to do is to send this mail with a link inside so that the receiver could click on that link wich opens Internetexplorer with www.myhomepage.com

Could someone give me a hint or tip on this issue?

Thank you very much in advance.
  #2 (permalink)  
Old 05-23-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,323
HTML tags are correct. but you need to output it to "log.html" in order for tags to be recognized correctly, otherwise it's just a plaintext file. You may also consider including "Content-Type: text/html" in the header.
  #3 (permalink)  
Old 05-23-2007
Felix2511 Felix2511 is offline
Registered User
  
 

Join Date: May 2007
Location: Madrid,Spain
Posts: 20
Now i'm coding:

#!/bin/sh

echo "<html><head><meta http-equiv="content-type" content="text/html Content-Disposition: inline charset=windows-1252"><body><a href="http://myhomepage.com">Mensaje</a></body></head></html>" >> "log.html"
sleep 5
! mailx -s "Test Mail HTML Link" myemail < "log.html"

# Return 0 for success, non-zero for errors

exit $RETURN_STATUS

But it still sends plaintext!!
  #4 (permalink)  
Old 05-23-2007
Felix2511 Felix2511 is offline
Registered User
  
 

Join Date: May 2007
Location: Madrid,Spain
Posts: 20
this works:

#!/usr/bin/ksh

export MAILTO="mymail@mail.com"
export SUBJECT="Test Mail"
export BODY="/test/log.html"
(
echo "To: $MAILTO"
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat $BODY
) | /usr/sbin/sendmail $MAILTO

exit

Thanks to all
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0