En ese
http://www.clubdelphi.com/foros/showthread.php?t=33778
Este
Código Delphi
[-]
procedure TForm1.Button16Click(Sender: TObject);
const
olMailItem = 0;
olByValue = 1;
var
OutlookApp, MailItem, MyAttachments: OLEVariant;
begin
try
OutlookApp := GetActiveOleObject('Outlook.Application');
except
OutlookApp := CreateOleObject('Outlook.Application');
end;
try
MailItem := OutlookApp.CreateItem(olMailItem);
MailItem.Recipients.Add('YourMailAddress@something.com');
MailItem.Subject := 'Your Subject';
MailItem.Body := 'Your Message';
myAttachments := MailItem.Attachments;
myAttachments.Add('C:\SomeFile.txt', olByValue, 1, 'Name of Attachment');
MailItem.Send;
finally
myAttachments := VarNull;
OutlookApp := VarNull;
end;
end;
Este otro:
Código Delphi
[-]procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Self.Handle, nil,
'mailto:eds2004 @ latiumsoftware.com' +
'?Subject=Test&Body=Just testing the example',
nil, nil, SW_NORMAL);
end;
No me permite cambiar el correo ni nada, en tiempo de ejecucion.
Y este
Código Delphi
[-]ShellExecute(Handle, 'open',
'mailto:SomeN@Somewhere.com?subject=MySubject&Attach=''C:\Attachment.txt''',
nil, nil, SW_SHOW)
me abre el outlook, pero yo no quiero que me abra el outlook, (que lo use, no hay problema), pero que
sea transparente para el usuario, o sea que el no se de cuenta que se envio el correo.
Y asi, puedo seguir poniente de ejemplos, pero igual no he podido lograr que ningun
me haga lo que describi en mi primer post.
Gracias
//Edite: Coloque etiquetas DELPHI.