Create customize email templates in Sitecore - html

I need to create a custom email template. I was thinking if we can create an renderings and have a data template created along and then create a content item with this as email the html body as an newsletter in Sitecore.
How can I achieve this? I want to get an HTML response in with all the data populated and then assign this html response to the email body and send it across.

Maybe you can take a look at:
Sitecore.Web.WebUtil.ExecuteWebPage("[YourWebPage]");
This executes the webpage and returns the HTML as string. As far as I understand this is what you are trying to achieve.

Related

Insert single time coupon codes as bar codes in Netsuite HTML email template

I'm trying to create an HTML email template that displays a bar code of a single-use coupon code dynamically in Netsuite through marketing campaign using this
<barcode codetype="code128" showtext="true" value="${campaignEvent.couponCode}"/>
and nothing is showing up, but when I try to print out the coupon code using ${campaignEvent.couponCode} it is getting printed correctly
As already answered, BFO is only used for PDF generation and not email templates.
You can use an online barcode API such as Barcodes4.me and embed the result in an image:
<img src="http://www.barcodes4.me/barcode/c128a/${campaignEvent.couponCode}.png?IsTextDrawn=1" />
Another similar service is bwip-js-api
That's the correct syntax for creating a barcode on a PDF and I've used it quite a bit.
However you write you are creating an html email and I doubt the barcode tag will generate anything in html. Can you share the source of the created email around where you expect the barcode to be? You could generate a pdf with the barcode and attach it to the email.
Or you could generate the barcodes as svg values in a batch and update a custom field on the customer and then include the field contents your html that way.
https://www.npmjs.com/package/jsbarcode is a bar code generator that works in multiple environments so it's possible it could be made to work in a mass update script.

Send all fields in email with HTML Webform

I have created a webform in HTML 5 and CSS 3. I would like the action to be set to email and send all of the fields.
Here is my currently existing code, using js fiddle: http://jsfiddle.net/o1njosLa/
This is the result from the email:
"message=128+Baker+Street%0D%0A%0D%0ALondon&email=john_doe%40example.com&website=http%3A%2F%2Fetetet.com&message="
So my questions are:
Is there an easy way to send the form to an email address without
having to open up outlook? I sure there are but I would just like a
decent and hopefully quick tutorial which I can just add on to my
existing HTML and CSS?
How can I get all fields to send in an email?
Thanks for your help.
You can't do it with HTML only, you can PHP (a server side language), you can find a guide on http://www.w3schools.com/php/php_forms.asp.

Customize Ektron HTML Form Email Layout

I would like to know if there's a way to customize the email HTML body contents when submitting an Ektron HTML form.
For example, a form is submitted and the form data is emailed to john#doe.gov. Upon opening the email, there is a table containing the data from the submitted form. I want to know if there's a way to modify the HTML table which was generated for that email.
My goal is to experiment with some CSS to force word-wrapping in the table so lengthy textarea-input data will be wrapped appropriately.
I've never tried customizing it, so I don't know if there are any "gotchas", but these files look promising:
/Workarea/controls/forms/DefaultFormEmailBody.xslt
/Workarea/controls/forms/template_FormDataDisplay.xslt
/Workarea/controls/forms/template_FormFieldValue.xslt
The table is generated in "template_FormDataDisplay.xslt", and the individual table rows are generated in "template_FormFieldValue.xslt".
The usual "I want to modify something in the workarea" warning applies: Make backups of any file you change, and know that installing an upgrade to Ektron will overwrite any of your changes.
Are you using php? Because you can edit the way that email looks once you open it. This is an awesome tutorial:
http://tangledindesign.com/how-to-create-a-contact-form-using-html5-css3-and-php/

Form Data to HTML Email

I have a rails application with a form for job applicants. Right now, when a user fills out the form the data is sent to an email in this format:
Position_Applied_For:
Name:
Telephone_Number:
Alt_Telephone_Number:
Physical_Address:
How_Long_At_Address:
Desired_Salary_Or_Hourly_Rate:
Specified_Hours:
Date_Can_Start_Work:
etc..
I'm trying to have the output sent to look like an actual job application using html to make the document and have the parameters fill the fields in the document. What would be the best solution to accomplish this?
Thanks!
Not sure what are you asking for exactly.. refer this link action mailer design.
You can edit mailer template in views and design its style using css, to look like job application.

How do I get HTML rendered in creating email message with velocity?

I use velocity to create a string writer, then merge that into a template. The template #includes html to make a simple table, yet only the raw HTML shows up in the email... it does not get rendered. Email is being sent from Google server to outlook client.
Can anyone tell me How can I get rendered HTML into an email message created with Velocity?
Thanks!
You have to set a Content-type: text/html header.
Appart from that, you have to be aware that all the different email clients may strip the HTML tags and features (for example, styles), so you have to experiment with different email clients and try to stick to a very basic feature set.