<< Click to Display Table of Contents >>
SetSmtpServer
SMTP 인증이 필요한 메일 서버를 이용할 때 SMTP 서버 URL을 설정합니다.
Prototype
void SetSmtpServer(string SMTPServerURL)
Parameters
SMTPServerURL |
SMTP 서버 URL |
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);
}
}