How do I send an email directly from a gmail add on? - gmail

I have developed a gmail add-on for personal use and it can currently draft a reply to a recipient using message.createDraftReply(replyMessage);. I then have to manually send email.
After the button click event, I would rather that the the email just be sent directly without further action needed on my end and the UI go back to the inbox (rather than the email view).
Is this possible? If so, can you please provide some direction/example.

Have you tried using the sendEmail method?
See documentation here:
https://developers.google.com/apps-script/reference/gmail/gmail-app#sendEmail(String,String,String,Object)

Related

Display email draft and send in Outlook on Button Click in Angular/NodeJs

I have a requirement wherein on click of button on a dialog, I want an email draft that will popup in Outlook so that any message can be customized before sharing the same.
This is to be integrated in Angular/Nodejs Application.
I assume below possibilities on same.
1.Using Angular to display emailsIds to which mail would be sent
2.On click of "send Email" button,there would be a nodeJs service call that would open Outlook with prepopulated emailIds selected from first screen and using node-outlook library setup up outlook call.
https://www.npmjs.com/package/node-outlook
Please suggest if any better approach possible for same and also if anyone has worked on such requirement a working demo code would be very helpful to build this on.
You could probably use window.open and mailTo protocol to open the email draft at client end.
window.open('mailto:abc#gmail.com;xyz#gmail.com?cc=pqr#gmail.com&subject=Subject&body=Hello World', '_self');
All Details required to be displayed on the mail could be fetched through node service calls.

Acumatica - Outlook PlugIn Reply Action

we are using Acumatica outlook plugin to create CASES and we are successful in achieving it.
As you know outlook plugin will automatically create a email activity when we create case. So sometimes we send reply from Outlook plugin and some times we send reply from Acumatica.
The issue is - When we send reply from outlook plugin we are unable to see email in "All Emails" screen, but if we are sending reply to same case from Acumatica we are able to see email in "All Emails" screen.
Can someone please suggest us, what we are missing here.
We are in 2019R2, without any customization published.
There could be a couple of reasons you may be running into this problem. Depending on how you have your setup, one reason could be because of the way you have your System Email Account set up. Check what email is sending as, it could be sending a centralized account. Also check what you default email is set on your account.
Also, are you using the Outgoing Tab? Or looking looking at the all records tab? It could be because of the status of your email. When sending through the Outlook plugin, double check the emails are sending, and double check the status of the activity. It could not be completing and being left as an open item.

Spfx for creating new draft email with attachment

I need to create spfx button that will upload selected library item/document to new draft email as an attachment. I assume this needs to be done via Ms Graph API (pnp msgraph). Does anybody have samples or suggestions on how can this be done?
Regarding the SPFx button, you will need to create and SPFx ListView Command Set extension. This will enable you to add a button directly into the document library command bar.
This guide should help you with that.
Creating the draft email is a little harder. There are many solutions that you can use to send the mail. The Send Mail MSGraph action is one way.
However, a solution could be to build and launch a mailto: link in your SPFx extension that contains the URL to the selected file in the message body. Not quite an attachment but this would create the draft email and open it in the users email client.
Hopefully this helps get you started

CRM 2011 System Workflow Sends Email Which Contains Link

I am sending email activity using system Workflow. It sends email where email-body contains a link.
What I do that I insert a link using "Hyperlink" button on the Email-Template provided by the System Workflow.
When this email received at on Outlook it works fine. If it is received on Thunderbird or Gmail or Yahoo, it distracted.
That "Link" text does not works as link anymore and it's value(i.e full URL) displayed over there.
What i can do for this in email template to works on other EMail client.
I formulate this email using system Workflow. I don't have such flexibility over here.
Any idea will be appreciated. Please help.
Thanks,
Anish

Approve/Reject in email generated by SharePoint

When I make a meeting in Outlook, the recipient gets a approve/reject button in the top of the email. I'd like to do a similar thing with SharePoint: when a task is created, an email is sent to the person the task is assigned to, and the email asks the recipient to either accept or reject the task. I've seen demos of people doing this with a custom ASPx page, but I'd like to make it directly in the email. How should I go about doing that?
I'm used to making workflows in Visual Studio, so I'm happy with code examples for setting up an email and/or parsing the response
Cheers
Nik
The approve/reject buttons in Outlook shows up because the email is in the iCalendar format. I dont know if this is the best way, but you can send out your own iCalendar emails using C# code and set the response email to a mail server you control. From that mail server you can process the email and use the SharePoint WebService API to approve the item in SharePoint.
I like JMD's suggestion but I don't know how you'd interact with SharePoint from the mail server.
It might be a easier to send an HTML-formatted email with two links (...) for the Accept and Reject buttons. You could use CSS to format them so that they look like real buttons.
You could then create an ASPX page (or better an IHttpHandler implementation) to perform an action based on parameters passed to it via a URL. You'd want to pass in the site, web and list details and the list item ID along with a value to indicate whether the item is approved or rejected.
Then set the URLs of your "buttons" in the email to call your handler and pass in the appropriate parameter values.
The downside to this is that the "buttons" would be part of the message body and not part of the Outlook chrome but, on the other hand, they would be usable from any email client.

Resources