Hello all,
I just found out that something has changed from FPC 3.2.0 to FPC 3.2.2
that is starting to cause error in a simple app I developed to send emails
through MS Outlook.
I use Lazarus v2.2.0RC2 and FPC3.2.2.
I use OLEVariant, and I believe the changes have taken place in the
unit ComObj, but I could be wrong.
PS:I do not own this code.
Snippet code:
uses comobj, variants;
...
procedure TForm1.SendBtnClick(Sender: TObject);
const
olMailItem = 0;
olByValue = 1;
var
MailItem: OLEVariant;
podatak: OLEVariant;
begin
try
Outlook := GetActiveOleObject('Outlook.Application');
except
Outlook := CreateOleObject('Outlook.Application');
end;
namespace := Outlook.GetNamespace('MAPI');
namespace.logon;
MailItem := Outlook.CreateItem(olMailItem);
podatak := '[email protected]';
MailItem.Recipients.Add(podatak);
MailItem.Recipients.ResolveAll;
podatak := 'Subject';
MailItem.Subject := podatak;
podatak := 'Body Msg';
MailItem.Body := podatak;
MailItem.Display;//send
Outlook := Unassigned;
end;
This code last worked fine while on FPC 3.2.0 but when upgraded it started
erroring at the line:
MailItem*.Subject* := podatak;
Appreciate if someone can assist in pointing out something (the above code
or the FPC code :)
Not sure if this is the right place to report this but will start here.
Thank you...
Jamal
--
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus