auto respond email for insertrecord submit

auto respond email for insertrecord submit

When I submit a record via API, I want an email automatically sent to the lead confirming we got their info.  I also want to make sure I get an email so I know I got a lead.  How can I do this?