Subject: | Overriding the From and Gmail |
Posted by: | mojoala (jwarr…@jimbishopcabinets.com) |
Date: | Mon, 12 Nov 2007 |
Here is the code:
procedure Tform1.button2click(sender: TObject);
begin
with Idmessage1 do
begin
From.text := 'myemailaddre…@home.com';
ReplyTo.EmailAddresses := From.text;
Recipients.Emailaddresses := 'youremailaddre…@work.com';
Subject := 'Test Gmail button 2';
Body.Text := 'Test';
IdSmtp1.connect;
try
Idsmtp1.Send(Idmessage1);
showmessage('sent');
finally
IdSmtp1.disconnect;
end;
end;
end;
The problem is that when the email comes to me, it has the gmail
emailaddress as the from email address.
Is there a way around this?
TIA