import com.coltware.airxmail.INetAddress; import com.coltware.airxmail.MailSender.SMTPSender; import com.coltware.airxmail.MimeMessage; import com.coltware.airxmail.RecipientType; protected function send_plain_Mail():void { var sender:SMTPSender = new SMTPSender(); sender.setParameter(SMTPSender.HOST, "smtp.gmail.com"); sender.setParameter(SMTPSender.PORT, 465); sender.setParameter(SMTPSender.AUTH, true); sender.setParameter(SMTPSender.USERNAME, "username"); sender.setParameter(SMTPSender.PASSWORD, "password"); var message:MimeMessage = new MimeMessage(); var from:INetAddress = new INetAddress("wtf@gmail.com","from label"); message.setFrom(from); var toRecpt:INetAddress = new INetAddress("abc@gmail.com","to label"); message.addRcpt(RecipientType.TO, toRecpt); message.setSubject("Hello World"); message.setTextBody("this is my first mail from flex"); sender.send(message); sender.close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)