How to send an email when i click a button

P

Paul B

Hi

I have 3 buttons on my form and need each one to send specific emails that
includes data from the form.

I have no idea how to do this. I have found quite a lot of code but i cannot
get any of it to work.

I am using portal and have SP1 on infopath. I really dont want to download
any other software due to the network.

Thanks in advance
 
S

Scott L. Heim [MSFT]

Hi Paul,

You can setup 3 "data connections" (e-mail) and then use a Rule on one
button to execute all three or a Rule on separate buttons execute each one
individually.

Sample steps to setup an "e-mail" data connection:

- Open your XSN in Design View
- From the Tools menu choose Data Connections
- Click Add
- Choose Submit and click Next
- Select "As an e-mail message" and click Next
- Complete the fields and click Next
- Assign a name for this connection that makes sense to you and click Finish

- Sample steps to execute the above from a button:

- Add a button to your InfoPath template
- Right-click on the button and choose Properties
- Click the Rules button
- Click Add
- Click Add Action
- Select "Submit using a data connection" from the Action list
- Select your e-mail connection from the Data Connection list
- Click OK 4 times to get back to your form
- Test!

I hope this helps...

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

Dave Harris

when the "Submit" is carried out on this, does it actually write back to the
table in the database?
 
S

Scott L. Heim [MSFT]

Hi Paul,

If you have only setup "e-mail" submit adapters, then no - these only
submit via the functionality you have provided...in this case, an e-mail.
If your InfoPath form is based on a database, then you will need to insure
you have a submit adapter for submitting the data back to the database.

I hope this helps!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

DWH4L3

"then you will need to insure
you have a submit adapter for submitting the data back to the database."
can you tell me how to do this part what i want to do is send the email and
have it viewable in a list Or table in the infopath form.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top