Reinhard wrote:
Variables:
objApp : Automation : 'Microsoft Outlook 11.0 Object Library'.Application
objMail : Automation : 'Microsoft Outlook 11.0 Object Library'.MailItem
//Create application
IF ISCLEAR(objApp) THEN CREATE(objApp);
//Create mail item
objMail := objApp.CreateItem(0);
// set properties
objMail."To"('someone@somewhere.com');
objMail.Subject('Tienes correo');
objMail.HTMLBody(' whatever html string you want to put here... ');
//Uncomment for display email
//objMail.Display();
//Send mail
objMail.Send();
you have to have outlook to use this code.
code shamelessly stolen from
http://tricksnavision.blogspot.com/I have used the same code but it does not send the HTML body into my Gmail account or other.
My CODE in Nav
// Automation Start
//Create application
IF ISCLEAR(objApp) THEN CREATE(objApp);
//Create mail item
objMail := objApp.CreateItem(0);
// set properties
objMail."To"(
'navuser1@gmail.com');
objMail.Subject('Important');
objMail.BodyFormat:=2;
objMail.HTMLBody :='<a href='+Text101+'>navuser1</a>';
//Uncomment for display email
objMail.Display();
//Send mail
objMail.Send();
// Automation End;
Text101 :=CurrForm.URL;