À (At) 10:49 -0400 10/10/02, Laurent Daudelin écrivait (wrote) :
>There are APIs in the system for routing out items (fax, print, etc.) but I
>don't think I ever saw public APIs specifically for email. I would think
>that this would be provided by the email client vendor, since there's never
>been any Apple API specifically for email.
There are APIs specifically for e-mail. This is what is used in ATA
Support log version.
Here is my code:
---- // Essayons de voir si on peut envoyer le journal. local item := TransportNotify('mail, 'NewItem, [nil]); if (item <> 'noTransport) then begin // On demande à l'utilisateur ce qu'il préfère. if ModalConfirm( "Apparently you have an e-mail software on your Newton. Do you want to send the log directly by e-mail or just export it to notes?", [{text: "Notes", value: true}, {text: "Mail", value: nil}] ) then item := nil; // nil = exportation vers les notes. end else item := nil;if (item) then begin // Courriel. // Il faut donc une information de personne pour que le message me soit addressé. item.toRef := [{class: '|nameRef.email|, _alias: NIL, _entryClass: 'person, _Unselected: NIL, _fakeID: NIL, labels: NIL, name: {first: "Paul", last: "Guyot"}, email: "pguyot_at_kallisys.net"} ]; // Il faut une cible. Le plus simple: l'application notes. targetInfo := { targetView: getroot(), target: GetRoot().paperroll:MakeTextNote(theLog, nil), appsymbol: kAppSymbol }; // Ouverture du dialogue pour que l'utilisateur puisse confirmer, choisir le client de courriel, // se mettre en bcc, etc. OpenRoutingSlip(item, targetInfo); end else begin // Notes. // ... end; ----
Paul
-- NPDS: http://newton.kallisys.net:8080/ Apache: http://www.kallisys.com/
-- Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html Read the Newton FAQ: http://www.chuma.org/newton/faq/ This is the NewtonTalk mailing list - http://www.newtontalk.net/
This archive was generated by hypermail 2.1.2 : Thu Oct 31 2002 - 12:02:26 EST