Gmail REST API, create draft with default "Send mail as" address - api

The following python statement creates a draft email for one of our users:
draft = service.users().drafts().create(userId='me', body=message).execute()
It does not, however, set the from field to the default "Send mail as" address, as previously specified by the user in a browser (Gmail > Settings > Accounts).
(After the draft email is generated programmatically as shown above, the user can manually adjust the "from" field, to select the default from the drop down list of available send addresses.)
Is there a way to programmatically generate a draft email such that the from field is the "Send mail as" default? In other words, is there a way to programmatically generate such that the from field is the same as if the draft email were manually generated in a browser?

The problem was that I was programmatically setting the email from field: message['from'] = "smith23#gmail.com", where "smith23#gmail.com" is present in the drop down list of available send addresses. This was overriding the default "Send mail as" address, as previously specified by the user in a browser (Gmail > Settings > Accounts).
The solution was to not set message['from'].

Related

Outlook Add-In to Save Emails After Sending

I'm looking to create an Add-In for Outlook that allows users to save emails, which are saved against a company in our system. Currently this works by the user opening an email and clicking a button I've created which opens the taskpane containing a form (which asks the user to select a company against which the email will be saved, and optionally provide an email description), whereupon pressing 'save' the email's ID and other relevant information are sent to an API which fetches the email from the rest API and saves the file in our system.
This technically works, though ideally I would like some functionality along the lines of:
User sends an email
my add-in to ask the user if they want to save the email immediately after they sending
If 'yes' is clicked, for the email saving form to appear in either the taskpane or a separate window so it can be saved
This is simply so they don't have to navigate through to their sent messages after sending and save them manually.
Currently I have tried using the ItemSend event for this, however it seems this is more for appending things to the email before it sends rather than after, and I don't seem to be able to use this event to get the email item or its ID. I had thought about potentially using the event to send the email to a custom mailbox and have it save as a result of this using a flow of some kind, however I think this would be rather difficult to implement due to needing user input to save the email in our system.

Impossible to delete attached file in SAP CRM email form

that there’s a missing object in the process which cause the system to raise an exemption. Can also check CRM mail form configuration with regards to attachments. Something in the configuration might be causing the object to be null.
Issue:
Attachments were not able to delete from mail form
ZCRMXX_MF_CAP
Steps to reproduce:
Connect to WEB UI with roles ZMASTERDATA role.
Select "Service" in left menu and click on "Mail forms" field.
Click on "Search" button and select mail form ID "TEST" .
In top menu, click on "More" and select "Attach file".
Select File attached and try to delete it.

How to Deactivate Auto Delete of Mails in Odoo

When ever we sent a Sale Order by Mail, after sending the mail gets deleted automatically. But, i want to keep those mails after sent also. How can i do that?
First Activate Technical features for Administrator User.
Then goto Settings menu --> Email --> Templates , then search for Sales Order - Send by Email . For that record Click on Advanced Settings tab and UN-check Auto Delete option.
You have to do that before sending the email:
template_values = {'auto_delete': False}
template.write(template_values)

Is it possible to add user tracking method in EDM (Electronic direct mailer) Email click?

Here is the scenario:
We have designed an email template in which there are two option buttons: "Yes" & "No".
We send this email template to a group of user email lists.
After that, can we track the event where a recipient clicks on either the Yes button or No button.
which method can be used to track down how many of the recipients had clicked the Yes button or the No button?
how difficult is it to track the selected option Yes/No made by each single user?
which tracker is preferred: database tracker, google analytics tracker, mailchimp or other 3rd party web services?
With Google Analytics, you can do manual campaign tagging where you assign specific query parameters to each button. The query parameters will track back to your Google Analytics data, and can tell you which buttons were clicked. This is an easy method as all you need to do is build specific URLs for each button, and then embed those URLs into the email template for each button.
Here is the URL Builder site: https://support.google.com/analytics/answer/1033867?hl=en

Compose a new message in the mail app by a clicking a button

I'm working on a Mac app and I want the user to be able to contact me via email. So I was thinking that there was going to be a button that says contact or something and when the user click on the button it will open the mail app and compose a new message that will be sent to my email address already added.
So kinda like an in app mail function that you can add on the iPhone and iPad apps.
Is this possible?
Using NSWorkspace's -openURL: method you can open a standard mailto: link which can include subject and body and it will launch user's default e-mail app (usually Mail) with pre-populated fields.
mailto:you#domain.com?subject=hello&body=text