createmail function

D

Deb

I note in one of the InfoPath sample templates that there is a createmail()
function. Is there any way to specify what recipient's email address as part
of the statement?

Thanks!
 
G

Greg Collins [InfoPath MVP]

There are various properties on the email object that you can fill in, such as:
emailObject.To = "";
emailObject.From = "";

etc.
 
D

Deb

So, how would I change the createEmail(); function to accommodate that?
Also, I'm not really a programmer but would like to know where to find this
type of information in the future. Thanks.
 
G

Greg Collins [InfoPath MVP]

You should be able to find sufficient info on these properties in the InfoPath help and on the MSDN web site.
 
S

S.Y.M. Wong-A-Ton

It would help a lot in the near future if you mentioned which sample form you
were looking at? It saves us time when trying to help you. :) Thanks!

You can find more information on the "To" property of the "MailEnvelope"
object here:
http://msdn.microsoft.com/library/en-us/ipsdk/html/xdproTo_HV01021343.asp?frame=true

Just set it to a string representing one or more email addresses and you
should be good to go. Another option is to pass it as a variable to the
createEmail() function like this:

function createEmail(emailAddress)
{
....
oEnvelope.To = emailAddress;
...
}

and then call it somewhere else in your code:

createEmail("[email protected]");
 
Top