Posts Tagged ‘google buzz’

The sample code for google gmail buzz using airxmail ( as3 smtp/pop library)

google_buzz

sender = new SMTPSender();
sender.setParameter(SMTPSender.HOST,"smtp.gmail.com");
sender.setParameter(SMTPSender.PORT,465);

//  use SMTP-AUTH
sender.setParameter(SMTPSender.AUTH,true);
sender.setParameter(SMTPSender.USERNAME,username);
sender.setParameter(SMTPSender.PASSWORD,password);

// use STARTTLS
sender.setParameter(SMTPSender.SOCKET_OBJECT,new com.hurlant.crypto.tls.TLSSocket());

// If you want to change the charset for mail header
AirxMailConfig.setDefaultHeaderCharset("UTF-8");
			
var mimeMsg:MimeMessage = new MimeMessage();
			
var from:INetAddress = new INetAddress();
from.personal = "coltware";
from.address = this.fromEmail;
			
mimeMsg.setFrom(from);
var toAddr:INetAddress = new INetAddress("buzz@gmail.com","buzz");
mimeMsg.addRcpt(RecipientType.TO,toAddr);
// set mail subject
mimeMsg.setSubject("My first buzz from airxmail");
mimeMsg.setTextBody("");

sender.send(mimeMsg);
sender.close();
RSS
Add to Google
2017年1月
« 2月    
1234567
891011121314
15161718192021
22232425262728
293031