There is one way to send e-mails via Javascript inside AngularJS? I am use parse.com too but I don't now how to do this function. Isn't required to do with parse.com.
I have read that it can to be possible if I use SendGrid or Mandrill but I need pay to use it?
AngularJS is a client side JavaScript framework.
That said, you may want to do two things :
provide a mailto: link, which will call the client's email application
or provide a form which permit to send the email content to a web service on back end
If you was thinking about the second option (I can't tell, your question isn't what I called "complet"), try to search an API online.
What you're trying to do (use a client side application to send email via a app account) is a really wrong approach,
This site have the resolution: https://sendgrid.com/blog/send-email-static-websites-using-parse/
Related
I want to access the email from Geotab.com, is there anybody who know about how to get email from server using api.Access email from server using api in jquery or javascript
Here's how you use the GeoTab API in Javascript:
https://geotab.github.io/sdk/software/guides/using-in-javascript
However, I don't see a way to access emails with the API. I didn't expect that either. Emails are served by a mailserver, not by an API. Obviously. An API can do many things, and the GeoTab API is no exception.
The question is: Do you actually want the emails, as emails, in which case you shouldn't be using the API, or can, what you wanted to do with the emails, be done with the API? (To answer this you have to read the documentation)
I am working on a website that I used create-react-app to create.
I need to make a contact page where the information entered will be sent to a specified email.
After doing some research I discovered this is going to require me to setup some back-end. I am very unfamiliar with back-end programming. I know about nodejs and am somewhat capable of setting up a basic server using that, but I have no clue how to connect it to the react site, or if I even need a node server (just mentioned it because I found Nodemailer).
What's a good back-end setup I should use? All I need to use it for is sending an input field's value to a specific email.
I'm sorry this is such a noob/vague question, I am just looking for some direction on what to start researching and learning. I don't expect a detailed answer on the purpose and precise operations of a back-end server, just some helpful guidance or somewhere to start learning!
Any help is really appreciated!
I can think of two options to connect to the back-end to send an email.
API: You create an endpoint on your backend (i.e. https://yourdomain.com/api/sendemail). Using expressjs, or some other server side library, you create that endpoint to receive a POST request. (https://expressjs.com/en/starter/basic-routing.html) You then use the front-end (fetch: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) to call the endpoint with the data needed in the email and in turn the endpoint calls your send email function with Nodemailer or whatever.
Form Submit: The other option is similar to the first in that it sends a POST request with the form data to the back-end. This requires that the server send back a new page and your browser will then reload. Where as the first option can be done without a page reload.
Not an expert on this but those are the two options I know of. Good luck!
Indeed it is an awesome day to everyone but not for me because I've been handling this battle cry for more than 13 days now and cant get it done. I have searched across the web but cant find the solution that can get my butt out of this mess. And yes stackoverflow is always my last resort when things get worse.
Can anyone suggest what is the best way(or even alternative) in sending email using js or jquery ?. Perhaps a simple snippet would do. Thanks!
You cannot send an email within the client browser. If your website is running on your own webserver, you can send a request from within the browser to your server that sends an email. If you're running a node.js server, there are many email apis.
For example, my business is a Mailjet customer, and so I can use the node-mailjet api on my server-side. Also there's https://nodemailer.com/ and similar npm packages.
Sending email only using javascript on client-side is not possible. By that you would give full control to user what and where he sends email - cool spam solution..
I wouldn't recommend to expose service from server that send email to client-side from server-side with full settings of message that will be sent. You don't want to allow spamming.
Only good approach is to predefine email on server and then when triggering action occurs resolve dynamic values in email on server and send email from server. Still you have to ensure user cant spam with some security policy.
So how to get out of this ? Implement service on server that will send emails for you (called with AJAX), lets say by code name and parameters. On server-side, choose template by code-name and resolve it by parameters passed with server request. Implement you security policy so you can be sure user cant spam (for example when user can choose to which email address will be message sent). Then pass it all to SMTP.
I want to add a contact page on my webpage. However, I'm apparently not allowed to execute a script on my site since it's hosted on a protected school server.
Is there a work-around where I could send an email on the client side? (maybe some ajax trick?)
All I've found so far is a way to use javascript to open the default mail client and prefill all the data. However, I don't really like that. I'd really like a way to send an email directly from my site. I was even thinking that I could create a java applet to create my email page if that's possible.
There is no way to send an E-Mail from the client without the user's consent.
It would be a horrendous security problem if it were possible.
You could make use of a remote form mailing service like FormToEmail, though.
Hi I need some code to send e-mail directly with javascript, without load the information on a outlook server, or any other email server.
I am using HTML as its a static website. Is there any way to achieve this or do I have to move to asp.net just to get the system.mail library.
Any help will be highly appreciated.
Regards
No, in javascript all you can do is to open the mail client (if any).
To send a mail directly you must use a server side language
IF you don't have server side access to a mail server, and if it's about sending a form / feedback, on plain html you can use a 3rd party email form system. There are numerous companies who offer free email forms, you submit the html form to their server, and they send the form to the address you wish.
For example, you can try this one: http://www.emailmeform.com/
You have different options, unfortunately no one fits perfectly your definition
you can use a third party email form system. You basically set up a contact form (fields, tos, ccs...) that is than loaded to your page.
You call a server-side method that is managing your request (so you should go for ASP.NET or any other server side language)
You have a WebService way to contact your mail server and submit email requests, than you'll just need an ajax call to perform the operation
Call the user mail client (i.e Outlook, Thunderbird)
There is no way to do it in client side without calling the user mail client (i.e Outlook, Thunderbird). You can use asp.net or PHP for this issue.
Email functionality is a server-side function. So, yes, you will need to revert to a server-side technology like asp.net.
How about using ajax controls? that way you can give the impression of "client-side" emailing without page flicker.