<< Click to Display Table of Contents >>
SetSmtpPW
SMTP 인증이 필요한 메일 서버를 이용할 때 인증할 사용자 ID의 패스워드를 설정합니다.
Prototype
void SetSmtpPW(string SMTPUserPassword)
Parameters
SMTPUserPassword |
SMTP 사용자 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);
}
}