Auto generated email In Oracle JET - javascript

I am creating an Oracle JET application in which I want to send an email to the user containing the user password when they click Forgot Password. I tried this using mailto: but it opens the mail client. I want the application to send mail without opening the mail client. Can someone please explain how this could be done. Can this be done only by using RESTful web services? Thank you.

Sending a mail requires a server-side action, i.e. connecting to an SMTP server. So if your RESTful web service is written in a language that supports SMTP, then yes you can do it. For example: http://www.journaldev.com/2532/javamail-example-send-mail-in-java-smtp
It has nothing to do it with Oracle-JET, which is just a UI framework.
P.S.
If you absolutely want to use client-side JavaScript just for the fun of it this answer shows how. But as the comments on it say, it's a complete breach of security.

Related

In-app Email Functionality for Hybrid Application

I am building a hybrid mobile application (HTML5, JS, jQuery, CSS3) and need to implement in-app email functionality with following features:
Email feature to only send emails with predefined text and dynamically generated URLs (embedded within the email body)
This email feature should not send email via default email clients (like Gmail for Android). Sender email/ account will be defaulted to a constant value; it will not be user dependent.
Email to ask app-user to enter only the links which are to be send and the email-id of recipient (this feature is implemented as a form in the html page).
I have seen emailComposer However plugin. I am not sure if it routes the request via the default email client of your mobile.
Please provide inputs on how to build this functionality.
I could be wrong, but sending an email from a client using a pre-determined from is not likely something you'll be able to do. The reason I suspect this is because sending an email from a device to a mail server without the users direct interaction or personal email address opens the door for malicious applications to spam email servers with content. There may be a way to do it, but it would be much easier to send a request to a web server and have the web server send the email.
Stack Overflow questions seem to have possibly proven me wrong.
How to send email in background in Android ?

Get username in WCF service from web client on Windows and Citrix

My current project constists of 2 components:
a WCF server application
a purely client-sided (javascript, jQuery, TypeScript etc) website which consumes the service.
When the client saves data to my database via the WCF service, I need to log who made the last modification to that data.
To do this I need the username of the account the client website's browser is running under.
Browser support needs to be:
Chrome
Firefox
IE 10/11.
I don't want to create a login form for my website, I want the user to be able to open the website and be logged on using their Windows/Citrix account.
Javascript can't get to the account username because of security concerns obviously.
Any suggestions?
I have a experimental answer for you. Not sure but posible to work correctly. I think, you can activate impersonation and basic authentication on iis. Then client(browsers) ask credentials to client. In service layer, you can enable impersonation too. but only iis impersonation may enough.

SOAP Web Service Single User Login Integration

Working on a project where i need to implement single-user login, or letting them use the same login on their main website, as well as on another site. Right now they are using a SOAP web service. I have used my googlefu to try and work this out, but I need some help.
https://www.kappaalphatheta.org/gateway2/production/com/theta/authentication/AuthenticationGateway.cfc?wsdl
Just above this is a link to their service. I am using a .net authentication service on our website. With no experience in SOAP or authentication, how can I set up my site to authenticate a user from their service, and also pull other information like address and email address?
I have looked at their site, and they are using javascript and not PHP, whereas on google most people use PHP. I would prefer to keep using JS or jquery.
Thanks for looking, and help is appreciated.

form authorization for asp.net web api using javascript

I want to rewrite business application using asp.net web api as service layer and use javascript to call the web api and get data, display etc.
I understand all the scenrios work fine, but main bottleneck is security. We have database for the user name and password. We want that user enter user name and password, validate it using web api. Then for each request pass the user name and password to check rights etc. What is the best way to secure this communication if any.
You're best bet is going to be implementing HTTPS with SSL. You would consider using an encryption algorithm, but everything will be expose anyone if you're using JavaScript which would make encrypting and decrypting on the client quiet pointless.
Here's is a good blog post reference you can review on the matter http://goo.gl/QkZOf

Emailing from Javascript

I know this topic has been covered from all sorts of angles but I'm not sure I've seen the answer to my specific question.
I am writing a prototype web page in HTML5, CSS, and Javascript. I want the user to be able to browse to a file to attach then attach that file to an email I send to a specific email address I've setup. I don't want the user's default email program to pop up.
I have addresses to SMTP servers within my companies intranet but I don't have access to a server at the moment to put server-side code on. On the web page the user will know email is involved but I don't want them to have to do a thing other than select the file and click a button with no other screens popping up.
I know how to use mailto in order to send an email but I don't think you can use that with attachments.
Is there anyway to do this without having to mess with the server side? Is knowing an smtp server address that I have permissions on enough? Again, this is a prototype but possibly the basis for a new feature on a product.
Thanks!
Is there anyway to do this without having to mess with the server side?
Nope, not unless the target browser has exposes an SMTP client object. (And I don't think any do. That would make spam botnets quite a bit easier to build...)
You need to do this on the server.
Email cant be sent just by client side . You must either use a mailto link if you want it on client side but that's not best way . Instead you should send a request to server and do server side processing .If you have SMTP credential you can send email with server side.
I recently wrote a plugin for PostageApp that lets you send emails through jQuery. Basically, you just have to feed it your API key along with the message payload and you can send it through. With PostageApp, you can add your SMTP servers to the app and send through them.
Usage looks like this:
<script type="text/javascript" src="postage.js"></script>
<script type="text/javascript">
$(function() {
$('p').postage({
apiKey: "API KEY HERE",
recipients: "recipient#email.com",
template: "TEMPLATE_SLUG" });
});
</script>
I didn't publish the plugin because well... it never made sense for production usage because your API key was exposed and that's not a good thing. However, it is decent for prototyping (I use it!) and I would be happy to share.
(Full Disclosure: I am the Product Manager of PostageApp.)

Categories

Resources