IO-1799 Change from address for emails.
This commit is contained in:
@@ -56,13 +56,9 @@ export function EmailOverlayContainer({
|
||||
: bodyshop.shopname,
|
||||
address: EmailSettings.fromAddress,
|
||||
},
|
||||
ReplyTo: {
|
||||
Email: currentUser.validemail ? currentUser.email : bodyshop.email,
|
||||
Name: currentUser.displayName,
|
||||
},
|
||||
};
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
const handleFinish = async (allValues) => {
|
||||
logImEXEvent("email_send_from_modal");
|
||||
|
||||
//const attachments = [];
|
||||
@@ -77,10 +73,15 @@ export function EmailOverlayContainer({
|
||||
// attachments.push(t);
|
||||
// });
|
||||
|
||||
const { from, ...values } = allValues;
|
||||
setSending(true);
|
||||
try {
|
||||
await axios.post("/sendemail", {
|
||||
...defaultEmailFrom,
|
||||
ReplyTo: {
|
||||
Email: from,
|
||||
Name: currentUser.displayName,
|
||||
},
|
||||
...values,
|
||||
html: rawHtml,
|
||||
attachments: [
|
||||
@@ -138,6 +139,7 @@ export function EmailOverlayContainer({
|
||||
}
|
||||
|
||||
form.setFieldsValue({
|
||||
from: currentUser.validemail ? currentUser.email : bodyshop.email,
|
||||
...emailConfig.messageOptions,
|
||||
cc:
|
||||
emailConfig.messageOptions.cc &&
|
||||
|
||||
Reference in New Issue
Block a user