Reputation: 33
Is it possible to send an email from Smalltalk using a Gmail account? I have configured my company mail server with Smalltalk to send email, but that's not going to cut it when I distribute the application. Answers with any of using Outlook, Yahoo or Gmail are acceptable.
Upvotes: 2
Views: 558
Reputation: 15907
For secure mail sending, take a look at ZdcSecureSMTPClient
in Zodiac-Extra
on a Pharo 2.0 image.
Class side shows using gmail.
Upvotes: 0
Reputation: 2847
You should state which Smalltalk you are using since there are different dialects and all have different ways of handling things like e-mail.
In Pharo, check out the class SMTPClient. There are class methods that have example methods showing how to send e-mails.
For VisualWorks, load the parcel NetClients and check out the classes MailMessage and SMTPClient.
Here's an example of code that sends an e-mail in VisualWorks:
(Net.SMTPClient host: Net.NetClient netSettings defaultOutgoingHost name)
user: Net.NetClient netSettings defaultOutgoingHost netUser;
send: (Net.MailMessage newTextPlain
subject: 'This is the subject';
from: '[email protected]';
to: '[email protected]';
text: 'This is the body';
yourself).
Upvotes: 1