Email an offer letter
Background: My database is used for tracking printing machinery specifically relating to purchases, sales, inquiries, etc. There are three main tables: Contacts, Machinery, and Requests. The Contact table includes all of the people (customer, dealer) associated with the database. The Machinery table includes information on each machine either in stock at the company or available for purchase. The Request table has a form where customer's inquiries can be stored (i.e. they ask for specific make, model, and provide a budget). There is also a relationship that allows for a portal to be made on the Request layout which will list all of the items in Machinery table that have identical characteristics to those in the Request record (so if the request is for a 1999 Komori AB-200, the page for that request has a portal which lists any machines in the Machinery table that match those criteria).
What I want to do is set up a script, which, when run, will send an email to a customer that his request has a match, and will provide him the specifics of the match. So a button that runs the script will be placed in the portal next to the details of the related records from the Machinery table, and when it is clicked, an email will be sent to the customer that informs him that his request has a match, and will include the details of his request (i.e. Make, Model, Year, Budget) and the details of the match (Make, Model, Year, Price, etc.).
Please advise how this can be done. Thanks.