email forwarding program

Michael Hudson mwh at python.net
Thu Jun 13 18:09:30 CEST 2002


mbell at cs.pitt.edu (Matthew Bell) writes:

> Hi,
> 
> I have a question regarding the email handling
> libraries in Python.  I'm trying to write a
> program that, based on some information it
> extracts from an email, forwards it to another
> person.  I've about figured out imaplib, but
> don't see how I can use it to forward on emails.

That's because you use smtplib to do that.  IMAP is for getting email.

> One possibility I've considered is to write out
> the email to a temp file, then make a call to
> the operating system to use the UNIX program
> mail

That seems a reasonable approach, too.  But you're looking for
smtplib.

Cheers,
M.

-- 
  But since your post didn't lay out your assumptions, your goals,
  or how you view language characteristics as fitting in with 
  either, you're not a *natural* candidate for embracing Design by 
  Contract <0.6 wink>.    -- Tim Peters, giving Eiffel adoption advice



More information about the Python-list mailing list