Fixed E-Mail Sending for New Api
This commit is contained in:
@@ -23,7 +23,9 @@ const loadedDocuments = ref([])
|
|||||||
const loaded = ref(false)
|
const loaded = ref(false)
|
||||||
const noAccountsPresent = ref(false)
|
const noAccountsPresent = ref(false)
|
||||||
const setupPage = async () => {
|
const setupPage = async () => {
|
||||||
emailAccounts.value = await useEntities("emailAccounts").select()
|
//emailAccounts.value = await useEntities("emailAccounts").select()
|
||||||
|
|
||||||
|
emailAccounts.value = await useNuxtApp().$api("/api/email/accounts")
|
||||||
|
|
||||||
if(emailAccounts.value.length === 0) {
|
if(emailAccounts.value.length === 0) {
|
||||||
noAccountsPresent.value = true
|
noAccountsPresent.value = true
|
||||||
@@ -141,7 +143,9 @@ const sendEmail = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await useNuxtApp().$api("/api/emailasuser/send",{
|
console.log(body)
|
||||||
|
|
||||||
|
const res = await useNuxtApp().$api("/api/email/send",{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: body,
|
body: body,
|
||||||
})
|
})
|
||||||
@@ -203,7 +207,7 @@ const sendEmail = async () => {
|
|||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:options="emailAccounts"
|
:options="emailAccounts"
|
||||||
option-attribute="emailAddress"
|
option-attribute="email"
|
||||||
value-attribute="id"
|
value-attribute="id"
|
||||||
v-model="emailData.account"
|
v-model="emailData.account"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user