J
J
jakiro10072021-05-20 11:10:41
PHP
jakiro1007, 2021-05-20 11:10:41

Vue how to send an email if the form is successfully completed?

Hello everyone, there is the following form for sending data to vue:

submitForm: function (e) {
                        var t = this;
                        this.$refs[e].validate((function (e) {
                            if (!e) return !1;
                            t.btnLoading = !0, l["a"].refund({
                                payId: t.payId,
                                type: t.model.type,
                                amount: t.model.amount
                            }).then((function (e) {
                                var a = e.data;
                                a.status ? (t.$notify({
                                    title: "Success",
                                    message: "This is a success message",
                                    type: "success"

                                }), t.$emit("success", {})) : t.$notify.error({
                                    title: "Error",
                                    message: a.errors.join("<br>"),
                                    dangerouslyUseHTMLString: !0
                                }), t.btnLoading = !1
                            }))
                        }))
                    }

How can I make sure that if the sending is successful, send a letter to the mail (any)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2021-05-20
@firedragon

You are at the front. You process the form on the back, in the same place do the sending of the Message if everything went well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question