# Sending a custom triggered email to a non-member

**URL:** <https://forum.wixstudio.com/t/sending-a-custom-triggered-email-to-a-non-member/8613>\
**Category:** Ask the community\
**Tags:** question, code, wix-members-area, wix-stores\
**Created:** [June 22, 2023, 2:22pm UTC](https://forum.wixstudio.com/t/sending-a-custom-triggered-email-to-a-non-member/8613 "2023-06-22T14:22:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicholas-d-wootton](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/nicholas-d-wootton/32/25159_2.png) [@nicholas-d-wootton](https://forum.wixstudio.com/u/nicholas-d-wootton)\
**Post date:** [June 22, 2023, 2:22pm UTC](https://forum.wixstudio.com/t/sending-a-custom-triggered-email-to-a-non-member/8613/1 "2023-06-22T14:22:58Z")

</div>

Hi there. I have a wix site that sends out custom digital PDF certificates to people. They purchase a certificate and fill in a text box which then gets sent off to [pdfgeneratorapi.com](http://pdfgeneratorapi.com) and it then sends a certificate back (with their custom text) which is then stored in a wix collection.

At the moment I can only seem to be able to email site **members** to tell them their certificate is ready - using the following:

```javascript
return triggeredEmails.emailContact(type, item.buyerID, {
            variables: {
                orderID: item.orderId,
                type: item.mainType,
                message: item.message,
            }
        })
        .then(() => {
            wixData.insert('Testing', {
                "State": 'email success'
            });
        })
        .catch((error) => {
            console.log(error);

            wixData.insert('Testing', {
                "State": 'ERROR: ' + error
            });
        });

```

Is there a way to collect the user’s email either on the product page, or on the checkout page, so that I can send an email without them being a site member?

I know I can use third party applications to do this, but I’d rather not have to pay yet another subscription!

Thanks for reading

---

<div class="post-metadata">

**Author:** ![reswebdev](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/reswebdev/32/31109_2.png) [@reswebdev](https://forum.wixstudio.com/u/reswebdev)\
**Post date:** [June 22, 2023, 3:14pm UTC](https://forum.wixstudio.com/t/sending-a-custom-triggered-email-to-a-non-member/8613/2 "2023-06-22T15:14:50Z")

</div>

What you could do is create a backend function for the onOrderPaid() event. This will give you the users email. From there you can create a contact in the CRM and then send the email to the contact.

Here is links to all of the support pages -  
[onOrderPaid()](https://www.wix.com/velo/reference/wix-stores-backend/events/onorderpaid?utm_source=google&utm_medium=cpc&utm_campaign=12188669214%5E122749788651&experiment_id=%5Eb%5E494823160042%5E%5E_DSA&gclid=Cj0KCQiAkZKNBhDiARIsAPsk0WgOHyHL3IwsMnkqqVqRDALg5Ta1FrpFK2mS8g5U64tjazTUY0rt1QoaAtDjEALw_wcB)  
[createContact](https://www.wix.com/velo/reference/wix-crm-backend/contacts/createcontact?utm_source=google&utm_medium=cpc&utm_campaign=12188669214%5E122749788651&experiment_id=%5Eb%5E494823160042%5E%5E_DSA&gclid=Cj0KCQiAkZKNBhDiARIsAPsk0WgOHyHL3IwsMnkqqVqRDALg5Ta1FrpFK2mS8g5U64tjazTUY0rt1QoaAtDjEALw_wcB)  
[emailContact](https://www.wix.com/velo/reference/wix-crm-backend/triggeredemails/emailcontact?utm_source=google&utm_medium=cpc&utm_campaign=12188669214%5E122749788651&experiment_id=%5Eb%5E494823160042%5E%5E_DSA&gclid=Cj0KCQiAkZKNBhDiARIsAPsk0WgOHyHL3IwsMnkqqVqRDALg5Ta1FrpFK2mS8g5U64tjazTUY0rt1QoaAtDjEALw_wcB)
