[plt-scheme] How to send, receive email?
Warren,
I would check out
http://schemecookbook.org/Cookbook/NetSendEmail
for the basics
For supplying a password...
use the keyword arguments to smtp-send-message:
#:auth-user "username"
#:auth-passwd "password"
If you are connecting to an SSL server, also use the keyword arguments:
#:port-no 465
#:tcp-connect ssl-connect
A full example:
(smtp-send-message (smtp-server)
from
to
(standard-message-header
from-header
to-header
cc
bcc
subject)
content
#:port-no 465
#:tcp-connect ssl-connect
#:auth-user smtp-username
#:auth-passwd smtp-password)
Jay
On 7/30/06, Warren Henning <warren.henning at gmail.com> wrote:
> Hi,
>
> I know PLT Scheme has libraries for POP3 and SMTP in the net library
> for sending email, but the examples for SMTP never show anything
> involving supplying a password or anything, and when I try to connect
> to my Gmail account over POP in MzScheme it always times out.
>
> Could someone post some recent working examples that I could change
> the parameter values of (from/to, etc.)? Ideally I'd like to play with
> code analogous to the following Python code:
> http://www.thinkspot.net/sheila/scripts/smtpmail.py.txt . I'm on
> Windows at the moment and I don't have any mail server running - I'd
> like to just do some simple programmatic email sending.
>
> Pretend you were developing a web application that sometimes sent
> email to users -- what kind of code would you need to write?
>
> Thanks!
>
> -Warren Henning
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
--
Jay McCarthy <jay at cs.brown.edu>
http://jay.makeoutcity.com/