Reputation: 4315
Im looking for a way to send an email from a angular 2 application. The solution i've considered so far is to have a php backend that send the email and then get the email content from angular 2 through a http post request.
Does this sound like it's possible? Is there a smarter way of doing this?
Any help and tips would be much appreciated!
Upvotes: 1
Views: 2203
Reputation: 602
There are lots of ways to do this. If you are working on a simple project, and don't need a backend server for much else; I would recommend an email service such as Mailchimp or Mandrill. They have an api that you can connect with to do lots of different things (Templates, schedules, bulk, etc..). I have used Mandrill in the past and it has worked very well.
Upvotes: 0
Reputation: 55443
Server is supposed to send emails.
What you can do is, you can set To,From,Body,Subject
fields from/by Angular2 (probably from Angular2 forms) and send it to PHP server through HTTP Client of Angular2. You can certainly check validation (if any required) at Angular2 side.
By the way there is nothing new with Angular2.
Upvotes: 1