Compose not send e-mail with attachments
Hi All, Firstly, apologies if this has been covered before but I'm struggling to find it on the forum.
I am trying to use the e-mail functionality in Ninox but so far I can't find the right solution. I have 2 scenarios:
Scenario 1:
- Compose (NOT SEND) an e-mail from a record
- Must include a print view as attachment
I currently have a button with the send email function with a BCC to me and an alert to indicate mail sent.
The issues I have had include:
- e-mail, on occasion takes extended time before arriving (between 20 minutes and 3 days)
- print view attachment sometimes shows previous edit and omits or includes data that is not current.
This would be the reason that I want the e-mail to open as compose and not just a straight send out, I want to confirm it is correct and have the option to add additional text.
Scenario 2:
- Compose (NOT SEND) an e-mail from a record
- Must include all attachments from the attachments tab
I currently use the e-mail field to generate a default set of text but can't figure out how to include the contents of attachments tab.
Any advice would be greatly appreciated.
4 replies
-
Rob
I can help you part of your problem ( i can't help you re the delay time scale as I don't have this issue as mine go out more or less instantly)
re compose the email - you could have a tab on the record and have additional fields that you fill in/auto fill and then a button to send/email the information and add your attachments at same time.
So what is use an formula field to capture the default email from my customer etc (it suits me to do this)
Then I pick up various fields as required plus an attachment
Here is on of my customer goods dispatched scripts
if Status < 2 or Status > 3 then (these lines check to see if the job status is valid)
alert("job Status is not in production")
else
Status := 3;
if not CEmail then (checks to see if the email file dis not empty)
alert("No valid contact in email field")
else
if DispFlag = 1 then (checks to see if you already sent the notification)
alert("Dispatched Confirmation already sent!")
else
let thisBody := first((select JobBag_Settings).OrderDispatchedLetter); (Sets the appropriate letter from several stored letters)
let myEmail := userEmail();
let adv1 := concat([1, 4, 7, 10]); (these 3 lines rotate an attached advert)
let adv2 := concat([2, 5, 8, 11]);
let adv3 := concat([3, 6, 9, 12]);
let mtd := text(month(today()));
let myAtt := switch true do
case contains(adv1, mtd): (3 lines actually picks up the appropriate advert)
first((select Contact_Mailing).Advert1)
case contains(adv2, mtd):
first((select Contact_Mailing).Advert2)
case contains(adv3, mtd):
first((select Contact_Mailing).Advert3)
end;
let log1 := first(select Quote_Settings).HTMLxLogo; (set the company logo)
let log1 := replace(log1, "{UL1}", shareFile(first(select Quote_Settings).xLogo));
thisBody := replace(thisBody, "{Ord Company}", text('Ordered By')); (these next group lines change the variable information in the default letter to math the records going out)
thisBody := replace(thisBody, "{Order Name}", text(EContact));
thisBody := replace(thisBody, "{Job Bag}", text('Job Bag'));
thisBody := replace(thisBody, "{Order Date}", text('Order Date'));
thisBody := replace(thisBody, "{Order Name}", text(EContact));
thisBody := replace(thisBody, "{Order Ref}", 'Order Ref');
thisBody := replace(thisBody, "{Qty}", text(Qty));
thisBody := replace(thisBody, "{Desc}", Desc);
thisBody := replace(thisBody, "{Del Company}", text('Delivery To'));
thisBody := replace(thisBody, "{Del Address}", text('Delivery Address'));
thisBody := replace(raw(thisBody), "{xLogo}", log1);
DispFlag := 1; (sets the flag to say the job has been dispatched)
sendEmail({ (next 9 lines deal with ending the email itself)
from: myEmail,
to: CEmail,
bcc: "sales@example.co.uk",
subject: "Your order has been dispatched by example group",
text: "Goods Dispatched Confirmation",
html: thisBody,
attachments: myAtt (this bit actually adds the attachment to the email)
});
alert("Goods Dispatched Email has been Sent"); (Alert to the use to say email has gone)
JobTabMenu := 1 (changes the job form view to another view)
end
end
endHope this can give you some insight
Mel
-
Hi Mel, WOW you have given me a lot to look at that :-) Many thanks for such a comprehensive reply and example set.
I will need to put aside some time to go through this but I'm very grateful for your response.
I think my current implementation might be a bit simplistic so some re-working is in order first to accommodate any new code.
Thanks again for taking the time to look at this
-
Hi Rob
You are welcome Sir
Not sure what Ninox app type you use. I use mac with cloud version.
the standard email field is good insofar as you can call your inbuilt email client and send- i used to have pre setup templates etc and manually add my attachments (great for adverts etc but not good as could not add variable info from a record)
The way I work now is to have letters/templates/logo etc in a separate table record(s) and reference these from the working table with the email requirements. I have gone on to do thing like have auto sweeps down the clients jobs lists etc detecting job changes/follows ups etc - these trigger daily from your log in.
Take a look at some of the excellent work that Steven has done which will give great insight to what is achievable - his various threads on all things email are legendary ! I have learned so much from this much respected forum guru
cheers
Mel
Content aside
- 8 mths agoLast active
- 4Replies
- 74Views
-
3
Following