<< Click to Display Table of Contents >>

SetSmtpPW

Sets password for SMTP user ID.

Prototype

void SetSmtpPW(string SMTPUserPassword)

Parameters

SMTPUserPassword

password for SMTP user ID

Example

function mailTest() {

   try {

       var mail = OZCreator.GetBuiltInObject(OZBuiltInObject.MAIL);

       mail.SetSmtpServer("mail.forcs.com");

       mail.SetSmtpPort(25);

       mail.SetSmtpID("oz@forcs.com");

       mail.SetSmtpPW("UserPassword");

       mail.SetFrom("oz@forcs.com","Forcs");

       mail.SendRetryCount(1);

       mail.SendRetryPeriodTime(10);

       mail.PrefixSubjectMessage("[Forcs]");

       mail.SetRecipients(RecipientTypeConst.TO, "user1@forcs.com, user2@forcs.com");

       mail.SetRecipients(RecipientTypeConst.BCC, "user3@forcs.com");

       mail.SetSubject("Mail Subject");

       mail.SetContext("Mail Context");

       mail.AddAttachmentPart("d:/sample.xls");

       mail.Send();

   } catch(e) {

       _ERROR(e);

   }

}