mibuso.com

Microsoft Business Solutions online community
It is currently Sun May 19, 2013 10:14 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re:
PostPosted: Wed Oct 29, 2008 9:59 am 
Offline

Joined: Wed Mar 19, 2008 9:08 am
Posts: 872
Location: XYZ
Reinhard wrote:
Variables:
objApp : Automation : 'Microsoft Outlook 11.0 Object Library'.Application
objMail : Automation : 'Microsoft Outlook 11.0 Object Library'.MailItem


Code: Select all
//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;

_________________
Now or Never


Top
 Profile E-mail  
 
 Post subject: Re: HTML in Body Email
PostPosted: Thu Mar 29, 2012 3:20 pm 
Offline

Joined: Wed Jan 05, 2011 4:59 pm
Posts: 18
Country: Switzerland (ch)
Hi,

I need to mail an e-Mail with a HTML body two, but i also need to change the send address (the customer wants to send the mails from its "info@domain.com"-Address instead of the current usernames (like "john.doe@domain.com") i saw that the mail automation has a function called "sendusingaccount" but it requires an account object and i don't know how to set the account-object for this task.

edit: [solved]

i just found out i overlooked the function "SentOnBehalfOfName" which works just fine for me.

regards
stli


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: