2. August 2007 17:42
NewMessage(ToName : Text[80];CCName : Text[80];Subject : Text[260];Body : Text[260];AttachFileName : Text[260];OpenDialog : Boolean) Ma
IF ISCLEAR(OApplication) THEN
CREATE(OApplication);
IF (NOT OApplication.Logon(TRUE,'','',FALSE,FALSE)) THEN BEGIN
OApplication.Logoff;
EXIT
END;
IF ISCLEAR(OSendMail) THEN
CREATE(OSendMail);
ErrorNo := 0;
//OSendMail."To" := ToName;
//OSendMail.CC := CCName;
OSendMail.CC := ToName;
OSendMail.Subject := Subject;
OSendMail.BodyFormat := 2;
MailGUIDValue := CREATEGUID;
//OSendMail.SetUserProperty(EMailLogging.GetMailGUIDFieldName,1,FORMAT(MailGUIDValue));
IF ISCLEAR(BSTRConverterBody) THEN
CREATE(BSTRConverterBody);
IF Body <> '' THEN BEGIN
BSTRConverterBody.ResetBSTR;
BSTRConverterBody.AppendNextStringPortion(Body);
END;
OSendMail.Body := BSTRConverterBody;
IF ISCLEAR(BSTRConverterAttachFileName) THEN
CREATE(BSTRConverterAttachFileName);
IF AttachFileName <> '' THEN BEGIN
BSTRConverterAttachFileName.ResetBSTR;
BSTRConverterAttachFileName.AppendNextStringPortion(AttachFileName);
OAttachments := OSendMail.Attachments;
OAttachment := OAttachments.Add(BSTRConverterAttachFileName);
END;
OSendMail.OpenDialog := OpenDialog;
MailSent := OSendMail.Send;
ErrorNo := OSendMail.ErrorStatus;
OApplication.Logoff;
9. Oktober 2008 16:19
20. Oktober 2008 16:43