hello,
I have written e-mailing code in deplhi through outlook.
procedure TForm6.EnrollClick(Sender: TObject);
const
olMailItem = 0;
olByValue = 1;
var
OutlookApp, MailItem : OLEVariant;
begin
try
OutlookApp := GetActiveOleObject('Outlook.Application');
except
OutlookApp := CreateOleObject('Outlook.Application');
end;
try
wsRecep:=UTF8Decode(mail_id);
MailItem := OutlookApp.CreateItem(olMailItem);
MailItem.Recipients.Add(wsRecep);
MailItem.Subject := 'Training Enrollemnt Details';
MailItem.Body := ('You have enrolled to the training courses');
MailItem.Send;
ShowMessage('Mail sent Successfully');
finally
OutlookApp := VarNull;
end;
end;
How do I add a Cc field and override sender's address?