how can I send email by clicking Send button in a widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 09:40 AM
Basically
I have a widget that has an "Email / Mail " button when clicking on it it should open the email window so that I can enter an email address and compose an email and send it.
- Labels:
-
Continual Improvement (CIM)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 10:46 AM
try this
html
<a href="" ng-click="c.mailTo()"><i class="fa fa-envelope" aria-hidden="true"></i> Mail </a>
Client controller
function($scope, $window){
var c= this;
c.mailTo = function() {
var url = "mailto:?subject=Emailsubject&body=emailbody";
$window.open(url, '_self');
};
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 09:37 PM
sharing some links for help
Custom button on Service Portal to send email
In server script of your widget, you can create event and this event will be captured by email notification.
Below article will give you code configure button and you can reuse this code to create your own widget and update server script of widget to generate event.
Create custom action buttons in Service Portal
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2021 05:53 AM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2021 12:33 AM
Just use mail to option
<p><a href="mailto:someone@example.com">Send email</a></p>
Also if you found the solution for your other questions, please consider marking the correct answer to close the thread.