Re: MIME/SMTP deleting text
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: MIME/SMTP deleting text

From: Gerald W. Lester <Gerald.Lester@cox.net>
Date: Thu Jun 30 2005 - 06:49:41 CEST

Earl Grieda wrote:
> I am using the MIME/SMTP packages in, if not the latest, a very recent
> version of tcllib. For some reason it appears to be deleting text.

Sorry, could not duplicate your problem.

My guess is that somewhere along the smtp/pop/imap path there is a virus
checker / phishing checker / spam checker that is removeing the links since
the message is not tagged as HTML but looks like HTML.

> ... If I just use sendmail to mail the file then it
> is correctly received.

Sendmail may be encoding it differently.

>
> Granted this is probably user error since the documentation for these
> packages is as clear as mud,

Please feel free to contribute better documentation. Did you check the
ActiveState's Cookbook and wiki.tcl.tk for examples?

I did make some small changes to your code since to make it work for me.
Here is what I have.

proc SendEmail {fileName to} {

  set P [catch {
    set token [mime::initialize -canonical text/plain -file $fileName]
    smtp::sendmessage $token \
          -atleastone 1 \
          -servers $::MY_SMTP_SERVER \
          -header [list To $to] \
          -header [list From $::WEB_TESTER] \
          -header [list Bcc $::ADMIN] \
          -header [list Subject "Header Info"]
           mime::finalize $token
  } catchResult]
  puts "$P CATCH: $catchResult"
}

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester               | "The man who fights for his ideals is |
| Gerald.Lester@cox.net          |  the man who is alive." -- Cervantes  |
+--------------------------------+---------------------------------------+
Received on Thu Sep 29 14:23:57 2005