LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   echo mypage.htm | mutt -s "hello news" myemail@gmail.com (https://www.linuxquestions.org/questions/linux-general-1/echo-mypage-htm-%7C-mutt-s-hello-news-myemail%40gmail-com-624938/)

frenchn00b 03-01-2008 09:14 AM

echo mypage.htm | mutt -s "hello news" myemail@gmail.com
 
Hello,

bash:
I would like to send an email with the content of it of HTML, so that it sends and displays an html when I open it wiht google mail.

Is there any way ? I guess that mutt should be capable of sending text as html.

I use nbsmtp and not sendmail.

thanks

homey 03-02-2008 06:50 PM

Do want to send the html file as an attachment, like this?
Code:

mutt -s "testing" -a February-26-2008.html mygmail@gmail.com < /dev/null

frenchn00b 03-03-2008 01:06 AM

Quote:

Originally Posted by homey (Post 3076136)
Do want to send the html file as an attachment, like this?
Code:

mutt -s "testing" -a February-26-2008.html mygmail@gmail.com < /dev/null

I would like it in the text (not in attachment)

more like

Code:

cat page.htm  | mutt -s "hello"  emailaddressse@gmail.com

homey 03-03-2008 05:00 AM

That worked on my fc8 box
Code:

cat page.htm  | mutt -s "hello"  emailaddressse@gmail.com
rpm -qa |grep mail
mailx-8.1.1-46.fc7
mailcap-2.1.25-1.fc8

rpm -qa |grep mutt
mutt-1.5.17-2.fc8

frenchn00b 03-03-2008 02:55 PM

Quote:

Originally Posted by homey (Post 3076473)
That worked on my fc8 box
Code:

cat page.htm  | mutt -s "hello"  emailaddressse@gmail.com
rpm -qa |grep mail
mailx-8.1.1-46.fc7
mailcap-2.1.25-1.fc8

rpm -qa |grep mutt
mutt-1.5.17-2.fc8

thanks, but still not workign
the content of the email says:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="e

and no web.

I did:
Code:


 
apt-get install mutt procmail
apt-get install screen
apt-get install python-dbus bug-buddy  reportbug openssl
apt-get install openssl libssl0.9.7 libssl-dev
 apt-get install mime-support
I too compiled nbsmtp
cd nbsmtp-1.00  ; make clean  ; ./configure --enable-ssl ; make ; make install

echo 'set sendmail="/usr/local/bin/nbsmtp"' > /home/frenchn00b/.muttrc
echo 'unset use_from' >> /home/frenchn00b/.muttrc
echo "relayhost=smtp.gmail.com" >  /home/frenchn00b/.nbsmtprc
echo "fromaddr=myemailaddress@gmail.com" >>  /home/frenchn00b/.nbsmtprc
echo "domain=myemailaddress@gmail.com" >>  /home/frenchn00b/.nbsmtprc
echo "auth_user=myemailaddress@gmail.com" >>  /home/frenchn00b/.nbsmtprc
echo "auth_pass=XXXXXXXXXXXXXXXXXXXXXXX" >>  /home/frenchn00b/.nbsmtprc
echo "auth_mech=login" >>  /home/frenchn00b/.nbsmtprc
echo "port=587" >>  /home/frenchn00b/.nbsmtprc
echo "use_tls=True" >>  /home/frenchn00b/.nbsmtprc
echo "use_starttls=True" >>  /home/frenchn00b/.nbsmtprc
echo "debug=2" >>  /home/frenchn00b/.nbsmtprc



and I have
Code:

dpkg -l | grep mail
ii  fetchmail                            6.3.6-1etch1                            SSL enabled POP3, APOP, IMAP mail gatherer/f
ii  gmail-notify                        1.6.1-3                                  A Gmail Notifier
ii  iceape-mailnews                      1.0.11~pre071022-0etch1                  Iceape Mail & Newsgroups and Address Book
ii  kmail                                3.5.5.dfsg.1-6                          KDE Email client
ii  libksieve0                          3.5.5.dfsg.1-6                          KDE mail/news message filtering library
ii  libktnef1                            3.5.5.dfsg.1-6                          Library for handling KTNEF email attachments
ii  libmailtools-perl                    1.74-1                                  Manipulate email in perl programs
ii  libmailutils1                        1.1+dfsg1-3.1                            GNU Mail abstraction library
rc  mailutils                            1.1+dfsg1-3.1                            GNU mailutils utilities for handling mail
ii  mailx                                8.1.2-0.20050715cvs-1                    A simple mail user agent
ii  metamail                            2.7-52                                  implementation of MIME
ii  mime-support                        3.39-1                                  MIME files 'mime.types' & 'mailcap', and sup
ii  mutt                                1.5.13-1.1etch1                          text-based mailreader supporting MIME, GPG,
ii  procmail                            3.22-16                                  Versatile e-mail processor
ii  python-twisted-mail                  0.3.0-1                                  An SMTP, IMAP and POP protocol implementati


Code:

dpkg -l | grep mutt
ii  mutt                                1.5.13-1.1etch1                          text-based mailreader supporting MIME, GPG



Code:

dpkg -l | grep mailcap
ii  mime-support                        3.39-1                                  MIME files 'mime.types' & 'mailcap', and sup

you see the error somewhere ?

I am looking forward to reading you and best wishes
Frenchn00b

Su-Shee 03-06-2008 04:12 PM

Try "-i" for "Specify a file to include into the body of a message."

frenchn00b 03-07-2008 09:05 PM

H E L P

with

I get this still in the content of the email and still no htm :
Code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">
<head>
<meta name="robots" content="noindex,follow" />
<base href="" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="generator" content="vBulletin

Code:

mutt -i /tmp/index.htm  -a /tmp/index.htm  someone@gmail.com < /dev/null
same problem with :
Code:

mutt -x -i /tmp/index.htm    someone@gmail.com < /dev/null
H E L P Please

frenchn00b 03-07-2008 09:18 PM

my .nbsmtp has:
Code:

relayhost=smtp.gmail.com
fromaddr=myemail@gmail.com
domain=myemail@gmail.com
auth_user=myemail@gmail.com
auth_pass=*pass*
auth_mech=login
port=587
use_tls=True
use_starttls=True
debug=2


frenchn00b 03-07-2008 09:21 PM

Could maybe alternatives to nbsmtp would work better ? please could you provide any help or configuration ?
thanks

Code:

~$ apt-cache search smtp | grep smtp
clamsmtp - virus-scanning SMTP proxy
drac - Dynamic Relay Authorization Control (pop-before-smtp)
esmtp - User configurable relay-only MTA
esmtp-run - User configurable relay-only MTA
hotsmtp - SMTP to Hotmail (HTTPmail) gateway
libesmtp-dev - LibESMTP SMTP client library development files
libesmtp5 - LibESMTP SMTP client library
libnet-smtp-server-perl - A native Perl SMTP Server implementation
libnet-smtpauth-perl - Perl module that provides SMTP authentication (Net::SMTP_auth)
libsmtpguard-dev - Development files for smtpguard
libsmtpguard1 - Shared library of smtpguard
msmtp - light SMTP client with support for server profiles
msmtp-mta - light SMTP client with support for server profiles
php-net-smtp - PHP PEAR module implementing SMTP protocol
pop-before-smtp - watch log for POP/IMAP auth, notify MTA to allow relay
postfix-smtpguard - smtpguard policy service daemon for Postfix
proxsmtp - multi purpose SMTP Proxy
qpsmtpd - Flexible SMTP daemon for network-level spam detection
smtp-refuser - Simple spam-block with refusal message
smtpd - Mail proxy for firewalls with anti-spam and anti-relay features
smtpfeed - SMTP feed -- SMTP Fast Exploding External Deliver for Sendmail
smtpguard - smtp flow control
ssmtp - extremely simple MTA to get mail off the system to a mail hub


frenchn00b 03-07-2008 09:34 PM

I just configured esmtp and I got that
after esmtp me@gmail.com < /tmp/page.htm

Code:

<meta name="keywords" content="Linux,how to,tutorial,operating system,linux,red hat,mandrake,security,linux help,installation,question,forum" />
<meta name="description" content="LinuxQuestions.org offers a free Linux forum where Linux newbies can ask questions and Linux experts can offer advice. Topics include security, installation, networking and much more." />



<!-- CSS Stylesheet -->
<link rel="stylesheet" type="text/css" href="http://www.linuxquestions.org/questions/clientscript/vbulletin_css/style-cc6a10ca-00007.css" id="vbulletin_css" />

<!-- / CSS Stylesheet -->

<script type="text/javascript">

still not working

H E L P Please

Su-Shee 03-08-2008 10:29 AM

mutt -i your.html -e "my_hdr Content-Type: text/html" -s foobar you@gmail.com < /dev/null

frenchn00b 03-08-2008 11:01 AM

Quote:

Originally Posted by Su-Shee (Post 3082115)
mutt -i your.html -e "my_hdr Content-Type: text/html" -s foobar you@gmail.com < /dev/null

Sorry if I am pretty crap in linux, but I got the following error :
Code:

mutt -i /tmp/page.htm -e "Content-type: text/html; charset=us-ascii"  -s foobar myemail@gmail.com < /dev/null
Error in command line: Content-type:: unknown command

and without -e and string, it is still not working...
that's not so easy.

I am looking forward to reading you !!

thank you in advance

Su-Shee 03-09-2008 02:44 PM

You forgot the parameter (a mutt parameter) "my_hdr".

You just change the mime type in the mail header and the mail with html content gets interpreted as html.

My command:

mutt -i your.html -e "my_hdr Content-Type: text/html" -s foobar you@gmail.com < /dev/null

You tried:

mutt -i /tmp/page.htm -e "Content-type: text/html; charset=us-ascii" -s foobar myemail@gmail.com < /dev/null

frenchn00b 03-09-2008 03:18 PM

Quote:

Originally Posted by Su-Shee (Post 3083246)
You forgot the parameter (a mutt parameter) "my_hdr".

You just change the mime type in the mail header and the mail with html content gets interpreted as html.

My command:

mutt -i your.html -e "my_hdr Content-Type: text/html" -s foobar you@gmail.com < /dev/null

You tried:

mutt -i /tmp/page.htm -e "Content-type: text/html; charset=us-ascii" -s foobar myemail@gmail.com < /dev/null

Code:

mutt -i your.html -e "my_hdr Content-Type: text/html" -s foobar you@gmail.com < /dev/null
IT WORKS !!!!!
I THANK YOU PLENTY !!!!!!!!!!!!

Please find my link

frenchn00b 04-19-2009 02:44 PM

Quote:

Originally Posted by frenchn00b (Post 3083273)
Code:

mutt -i your.html -e "my_hdr Content-Type: text/html" -s foobar you@gmail.com < /dev/null
IT WORKS !!!!!
I THANK YOU PLENTY !!!!!!!!!!!!

Please find my link

It didnt work !! again, so I got a solution:

to be cont.


All times are GMT -5. The time now is 05:08 PM.