View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

sending emails in smalltalk

So for our calendar we added a text message and email notification system. Their are two ways of doing thing. if you don't want to or have to use the gmail smtp server then you can use the following format.
This is the basic format you need to do:
msg client
“all commented need to be changed”
msg := MailMessage newTextPlain.
msg from: 'user1@system.com'. “address of where you want email to go”
msg to: 'user2@system.com'. “start address”
msg subject: 'test mail from VW'.
msg text: 'This is a message test, just ignore it'.
client := SMTPClient host: 'smtp.system.com'. “smtp server url”
client user: (NetUser username: username password: password).
client useSecureConnection.
client connect.
client login.
client sendMessage: msg.
client quit.

if You want to send emails through gmail you have to use the Security.X509.SSLBadCertificate this is an smtps security certificate that gmail accepts.

Also if you would like to see our implementation go to the store repository and lookup #TeamAlpha and download it. Then look in Framework at the EmailOrText class.

Finally if you would like to send text messages these are the emails of the major US carriers where xxxx... represents a typical 7 digit number.
Email addresses for the primary U.S. based cell phone carriers:
Alltel = xxxxxxxxxx@message.alltel.com
AT&T = xxxxxxxxxx@mms.att.net or xxxxxxxxxx@txt.att.net
Boost Mobile = xxxxxxxxxx@myboostmobile.com
Centennial Wireless = xxxxxxxxxx@myblue.com
Einstein PCS = xxxxxxxxxx@einsteinmms.com
Nextel = xxxxxxxxxx@messaging.nextel.com
Sprint = xxxxxxxxxx@messaging.sprintpcs.com or xxxxxxxxxx@pm.sprint.com
T-Mobile = xxxxxxxxxx@tmomail.net
US Cellular = xxxxxxxxxx@mms.uscc.net
Verizon Wireless = xxxxxxxxxx@vtext.com
Virgin Mobile = xxxxxxxxxx@vmobl.com


hope this was helpful
Farzon Lotfi of Team Alpha
ps the smalltalk daily videos were really good on teaching how to use this. That would be my first place to look if you want to do any neat extra credit features.

secure smtp (smtps) smalltalk daily videos
http://www.cincomsmalltalk.com/blog/blogView?entry=3437195329
http://www.cincomsmalltalk.com/blog/blogView?entry=3425623677

smtp video
http://www.cincomsmalltalk.com/blog/blogView?entry=3461988290&printTitle=Smalltalk_Daily_09/15/10:_Sending_Email_from_Smalltalk&showComments=true




Link to this Page