This works fine but when i add Text to the displayed Email and press Return, it makes a p and not a br... T know that this is correkt because i selected HTML as Body Format and in HTML Return should be a p and not a br. When i click in outlook at "new mail" and write a text as HTML Mail, there is no space between the rows i changed with Return because i changed the preferences for the emailtemplate. The email generated with OLE has not the default template, so i searching a way to change this to the default.my $outlook = new Win32::OLE('Outlook.Application') or die "Could not +open Outlook Application!\n"; my $msg = $outlook -> CreateItem(0); unless ($msg){ die "Outlook is not running, cannot send mail.\n"; } $msg->{'To'} = 'test@test.com'; $msg->{'Subject'} = $vorlage_betreff; $msg->{'BodyFormat'} = 'olFormatHTML'; $msg->{'HTMLBody'} = $vorlage_body; // HTML Code read from file my $attach = $msg->{'Attachments'}; $attach->add('C:\\xxx.pdf'); $msg->Display();
In reply to Win32-OLE Outlook default template by kean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |