View previous topic :: View next topic |
Author |
Message |
d4mo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_storm_trooper.gif)
Joined: 27 Jun 2005 Posts: 430
|
Posted: Wed Dec 01, 2010 12:09 am Post subject: Attach image to email with ssmtp or mailx |
|
|
What is the best way to do this?
I saw some stuff on uuencode and mimencode. But I want the image to be visible in a gmail account. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
py-ro Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1714555094ed55010ccff6.jpg)
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Wed Dec 01, 2010 1:22 pm Post subject: |
|
|
This is how attachments are encoded, they will be visible.
Py |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d4mo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_storm_trooper.gif)
Joined: 27 Jun 2005 Posts: 430
|
Posted: Wed Dec 01, 2010 2:14 pm Post subject: |
|
|
Maybe I am doing it wrong then. Because when I do it, call I get is a bunch of text in the email and it's not decoded.
Any advice? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
toralf Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/10034462014367c4dfe33c1.gif)
Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Wed Dec 01, 2010 2:25 pm Post subject: |
|
|
This works for me: Code: | tfoerste@n22 ~/workspace $ cat misc/mymailx.sh
fn_sendmail()
{
echo "From: <noreply@nowhere> Do not reply to this address
To: tfoerste@localhost
Reply-To: user@other.domain
Subject: test
X-MSMail-Priority: High
Importance: 1
Mime-Version: 1.0
Content-Type: text/plain
This is a test email ...
Rgds
"
[[ -f $ATTACH ]] && uuencode $ATTACH $ATTACH
}
ATTACH=$1
fn_sendmail | /usr/sbin/sendmail -t -O DeliveryMode=i -R hdrs -n
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|