Create template email with Automator - automator

Is it possible to create a automator shortcut of some kind that creates a new mail in Apple Mail with a specific email address in TO and a specific text in Subject?

If the Recipient and the Subject of the new Email is going to be the same every time, you can edit the toRecipient and the emailSubject of this following AppleScript code then add a Run AppleScript command to a new Automator Quick Action and paste the code into the Run AppleScript command
property toRecipient : "John_Doe#gmail.com"
property emailSubject : "Insert Email Subject Here"
property emailContent : "Insert Email Content Here"
sendNewEmail()
to sendNewEmail()
tell application "Mail"
activate
set newEmail to (make new outgoing message)
set content of newEmail to emailContent
set subject of newEmail to emailSubject
tell newEmail
make new to recipient with properties {address:toRecipient}
end tell
end tell
end sendNewEmail
After you name and save your new Automator Quick Action, all you need to do is assign it a new Keyboard Shortcut in System Preferences.

Related

How to to get the string value of custom field (single select) using listener in jira

I am a new learner of Jira and I have no experience with Script runner, And I trying to Write a script in ScriptRunner that gets initiated every time a user selects the “other” option. the "other" is one of four options which I added it under custom field and the type of this field is single select.
what i have done is open scriptrunner> create listener> choose Custom listener> select the project> and write this script:
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObjectByName("impacted")
def cFieldValue = issue.getCustomFieldValue(cField)
If cFieldValue== "Other"
return "there is no another option"
this script didn't work with me. can any one give me .
Can someone give me advice or help for script?
Simply append a .toString()
def cFieldValue = issue.getCustomFieldValue(cField).toString()
Maby you can replace your whole code with:
def cFieldValue = issue.getCustomFieldValue("impacted").toString()

Django email verification - customize email html & 404 not found accounts/profile/

I have two issues. Email verification works well, but I want to customize the email sent to users. Here is the content of the email:
Hello from Localhost!
You're receiving this e-mail because user test has given yours as an
e-mail address to connect their account.
To confirm this is correct, go to
http://127.0.0.1:8000/rest-auth/registration/account-confirm-email/MTE:1h4DCn:JtkrZ1wkENQIdG8ysIVu7Qx_R44/
Thank you from Localhost! https://localhost:8000/
How can I create an html file and fill in the content that I want to be sent in the email? And how about the email subject?
The second issue, is that when I click on the link, the user gets verrified, but then I get a 404 error on /accounts/profile.
Here is my code:
from allauth.account.views import confirm_email
urlpatterns = [
path('accounts/', include('allauth.urls')),
path('rest-auth/', include('rest_auth.urls')),
url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', confirm_email),
path('rest-auth/registration/', include('rest_auth.registration.urls')),
]
Do I have to add a url for accounts/profile/ and create an html template showing that the email verification was successful? Also, is there a way to change to url to i.e accounts/verification-success/?
Custom e-mail
You can find the default e-mail templates used here: https://github.com/pennersr/django-allauth/tree/master/allauth/templates/account/email
Subject: email_confirmation_subject.txt
Text e-mail: email_confirmation_message.txt
You can override them in your Django app like any other template.
To activate HTML, you just have to add your own file with the name email_confirmation_message.html.
You can also have different messages when you signup or just confirm an e-mail address.
You can have a look into the code to understand how it works.
accounts/profile/
When you end up here you have successfully logged in. However, you will need to implement a view for this URL yourself, as whatever is to be displayed here is project specific. You can also decide to redirect elsewhere:
https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url
From https://django-allauth.readthedocs.io/en/latest/faq.html#when-i-attempt-to-login-i-run-into-a-404-on-accounts-profile
Since you have to implement the profile yourself, you can use accounts/verification-success/, too.

Is there a way I can get the text that has been typed into a text field in the app (by user) to be sent to me?

The only thing I don't want is to make users open up the ComposeMail viewcontroller. I just want them to type text into a text field (or multiple text fields), hit a 'submit' button, and somehow, that text be sent to me.
I was thinking that it could be sent as an email without the viewcontroller if I set the email address as some random address like example#gmail.com, or something.
THANKS

Can I filter Jira Issues that were created via a mail handler?

I'm hoping to create a report that will return all of the Issues that were created via a mail handler that we have set up.
I thought about trying to use "reporter=" in the JQL, but that only works in the cases for when the user isn't already in our system (we've set createuser=false).
I'm running 5.2.5, not-OnDemand.
You could work around this by having the mail handler add a unique tag to each issue that it creates, and then just filter on the tag.
First, create a custom field called "By Email".
than, using Script Runner, add the following script to the workflow, to the create transition:
from com.atlassian.jira import ComponentManager
cfm = ComponentManager.getInstance().getCustomFieldManager()
# read issue description
description = issue.getDescription()
if (description is not None) and ('Created via e-mail received from' in description):
issue.setCustomFieldValue(cfm.getCustomFieldObjectsByName("By Email"),'By Email')
this will add 'By Email' to all issues created by emails. Than, you can find those issues using the following JQL:
"By Email" is not EMPTY
Let me know if you're having truble implelenting this solution.
NOTE: If the email is sent from an email known to Jira (Jira's user) the sender will be set as the autor of the ticket and his email will not be saved.

Salesforce Create Buttons and Links option - Custom URL to launch email template

I have an email template that I would like to launch from within the case using a Link/Button. I see the option under setup->customize->cases->button and links I even see where I need to place the URL. What I don't see is nay documentation on how to build the URL to launch an email template. Any help you be great
I don't know if this is documented anywhere by salesforce, but I found from some guess work:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn
Just use that as the url content of a custom button or link. This one is for cases, as you are trying to do, but I think this should work for other types of objects as well.
The parameters are p3_lkid, which is the case id, p2_lkid which is the id of the contact you are emailing, and template_id which is hardcoded to the desired email template. (You can find this id by looking in the url of the Setup page for the template)
This was really helpful. I did, however, figure out another way to do it. Click on the "Send an Email" button you currently have. Copy the URL and add &template_id=YOUR TEMPLATE ID.
There is one other ID number that will show up in the original URL. Change that to be the dynamic field you want it to be.
For example:
Copy url from "Send Email": https://na3.salesforce.com/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1
Add &template_id=YOUR TEMPLATE ID so it looks like this:
/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1&template_id=YOUR TEMPLATE ID
Remove the other id (it's the object you used to send the email - so in this case, I was wanting to be able to send an email directly from a Campaign) and replace with the dynamic field:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Campaign.Id}&retURL=%2F70150000000Axih&template_id=YOUR TEMPLATE ID
And voila! It should work!
Abeyer's answer is good. However, if the template contains solution attachments "{!Case.Solution_Attachments}" the attachments will not get included unless you add the new_template=1 parameter to the URL making it:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn&new_template=1

Resources