3
I wonder if it is possible to save an email in the default email manager output box (Outlook, live mail, among others) using Indy10.
Today I already have a function to send email, but calls the manager’s new email screen for each message. This for a single email works well, but if it is a direct mail there is already bad, because it will open a new window for each email.
Below routine to send the email.
IdMessage.Clear;
IdMessage.Subject := 'Assunto teste';
idMessage.ContentType := 'multipart/mixed';;
IdMessage.Body.Text := 'texto do email';
AdicionarDestinario(IdMessage.Recipients, '[email protected]');
Arquivo := 'c:\emails\email.eml';
IdMessage.SaveToFile(Arquivo);
ShellExecute(0, 'open', PChar(Arquivo), '','', SW_SHOWNORMAL);
Ariel, put your code, I believe sending to the outgoing box is not possible, but we will wait. But maybe change your code to not display new window for each email.
– David
@David, this is the routine that generates the email.
– Ariel Inacio Correa
If you are already using Indy to create your message, why not go further and send the message by Indy? So you do not depend on other programs.
– user2385
But to answer your question, I don’t think you’ll be able to do that in a generic way for the default email manager. You would probably have to figure out where the email manager stores your output box and save your message there in its format. Then it would have to be customized for each program.
– user2385