我正在尝试让我的家庭网络上的系统通过电子邮件发送图像(.png)。我得到的最接近的是:
uuencode -m snapshot.png snapshot.png | mailx -r "sending@myremoteserver.net" -s "Snapshot" -S smtp=smtp.myremoteserver.net me@myremoteserver.net
哪个收到邮件给我,但输出有点不尽如人意......
begin-base64 755 snapshot.png
AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8A
AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA
(well, you get the idea...)
AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8A
AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/
====
问题是,我必须通过 smtp.myremoteserver.net 发送。但是我的邮件客户端没有对图像文件进行解码(我在 Thunderbird 和各种网络邮件界面中尝试过,结果相同)。有没有更好的方法实际上有效?
更新:只是为了好玩,我运行了这个:
uuencode -m snapshot.png snapshot.png > coded.txt
解码后,我得到了一个乱七八糟的,看不见的烂摊子。所以问题一定出在uuencoding上。