Working on a project for my employer. They are searching for a solution to connect JSON to a email template.
For now, I look for a solution where the system who has the JSON, loads the JSON script on a server. Then, we connect that server with a marketing automation system, for example Marketo. We like to create an email template which loads the JSON.
The developer we found, says it is not possible and it will not work in gmail, outlook or any other client. For what I know, it is possible to create a email template with JSON right? Just to be sure, because when it is possible, our problem is not the system, but the developer.
Like to hear your thoughts on this subject. Suggestions are welcome.
So, this can be done, but you're going to need to do some custom development.
Marketo's API includes a request campaign endpoint for triggering Smart Campaigns, including those which send emails. As part of the request campaign payload, you can send {{my.token}} values for the campaign.
If you can set up some middleware between your JSON output that renders the HTML for your email, you can push that rendered HTML as a token in the campaign request, allowing for on-demand email creation based on your JSON content.
There are two caveats with this approach:
You will have to dynamically send the email using Request Campaign. That means if you need to send unique content to multiple folks, you'll be using one API call per email.
Due to the nature of Request Campaign triggers, you will not be able to batch and send using Marketo's controls; however, this should be straightforward to set up on the API side.
You can build an email using dynamic data, e.g. from an API that sends JSON.
However, you cannot send an email that calls dynamic data. The final email that gets sent must be static. That may be what your developer is getting at. Email software will strip out scripts.
Related
My company is having trouble with account activation emails not sending out the proper activation link within the email so users can complete the account creation process.
We run our email sends through SendGrid and they instructed me to send them my JSON payload for email sends so they can see what the issue is causing this disconnect.
I have never had to work with JSON or pull this type of data and embarrassingly do not know where to start. How would I go about viewing this data?
I want to send an email activation code for users who sign up on the website. If possible, I would like to use an Angular service so I can use it later in other projects.
... I think you CAN NOT send an email only with Angular4 .. .but you need also a Back End implementation .. like node.js or Asp.NET or what you prefer...
example :
http://tphangout.com/angular-2-sending-mails-from-your-app/
I suppose you need to send from client side(not using a server side like node.js, web api, wcf etc..).
You can not send directly but using external javascript libraries, apis you might able to send. Take a look here, there are pretty much discussions about sending email with javascript.
How to send an email from JavaScript
Premise:
This question is more like "is this the correct approach?" rather then "how do I do this?"
Situation:
I have created a CherryPy REST application following this tutorial. The data are returned using the json module with a simple json.dumps. This example works. I have a mako template which I would like to use to create a HTML table with the data. Again, the template by itself works.
The question: In my head, it works this way:
The user asks for a URL
The REST API creates the JSON with the results
The mako template produces the HTML given the results
The HTML is returned to the user
My problem is, I'm not sure this is the right approach: in my (small) experience, the JSON should be returned to the client, which should render it in some way (using jQuery or some other client-side language); instead, the mako template works on the server-side, and that's where I got stuck.
Do you have any advice?
You don't need REST to solve this, this is a regular web application. Just to show you how this works by a REST service:
The user asks the REST client to do some-automated-stuff on the service
The client requests example.com/api/v1 to get the main page
The client looks for hyperlinks on the main page
The client finds hyperlink with relation=some-automated-stuff
The client follows that hyperlink and gets a JSON result from the REST API
The client uses the mako template and produces the HTML given the results
The HTML is returned to the user
A typical client is a 3rd party server side application, which is registered by the service and got a unique API key. The users allow to the clients to do some-automated-stuff on their account by giving permissions to API keys. So for example the service can be the facebook API and a client can be an application developed by Zynga e.g. Farmville. When you allow to the client to post on your news feed that you just harvested 100000 crops on your farm, then it sends a request about this to the facebook API and so some automated message will show up on your news feed.
Ofc. you can write a 1st party AJAX or server side client if you want, but if you don't want to support 3rd party clients, then it does not make much sense to develop a REST service. Ofc. your client won't break as easy as by regular applications, so it might worth the effort if that is important.
I create small form (Name, email, Subject, Message) in Flash. Want to send this by email using AS3 code.
Can we use this offline? Like, we fill all the detail and after submit then its go online and receive the detail in email
as #esimov said, security is not major concern then you have to use SMTPMailer, because your mail send in pure text form to the e-mail server. but if you want to use SMTPMailer then you can use some encryption and decryption method in it. This encryption packet with key are traceable. so If security is major concern then you must use airxmail written in actionscript so you can send and receive mail with SMTP, POP3, IMAP4 protocol. best example are given to send and recieve a mail.
May this will help you.
If you want to use an email client directly using Flash technology you need to stick with Flex. It has a robust backend interaction and even more it allows to do some cross scripting interactions.
However if you wish to use Flash and not Flex, actually there is an email sending application called SMTPMailer which sends attached files through emails with the Socket class available in the Player 9 and AS3. Please note, that for security reason is always better to send emails from the server side of the application. So another possibility would be to integrate the email sending part in a server side script.
Is it possible to use email to update mysql table?
for example I have someone send email which have today article with the image as an attachment and it have to send to particular email address (eg: abc#something.org) to be able to process data to sql table, other address will not work for updating.
Once it receive, it automatically proceed and update sql from the article it receive.
How is it work?
is there any open source that may help this process
Not by sql, you have to involve some sort of programming language which have a subset of methods to communicate with the database and that can receive and send email.
Take a look at Sendgrid (at http://sendgrid.com): they have a parse API (see http://wiki.sendgrid.com/doku.php?id=parse_api for details) that basically lets you convert an email into an HTTP POST. So if you already have a web page that can update the MySQL database you can just modify it to comply with their spec, set up a sub domain that forwards to Sendgrid and then setup a Sendgrid endpoint that takes any email to that sub domain and posts it to your web page.
It depends on your application. If you're using a framework like Wordpress, there are plenty of plugins available to integrate (e.g. Postie). If you have your own custom application, you may find an open source script to download the new messages, but you'll have to implement your own code to update your database.