How to embed the consistent data in HTML Email - html-email

How could I have something like <b>Case ID</b> : <span id="caseDtl_caseId">00004</span> in HTML email consistently? I have found that when the email was replied, the id attribute is lost. Or is there the better way to retrieve the information from non-formed email?
Regards,

Why don't use the Message Headers instead, eg if your generating the Message you could set/store the MessageID of the message you send and then use the In-Reply-To header to identify responses https://www.rfc-editor.org/rfc/rfc4021#page-10, Or use the Thread-Index/ConversationId properties like the Mail Clients do to track messages in a thread.
Cheers
Glen

Related

Content-type issue for email attachments mule

I'm using Mule's IMAP connector to read email attachments. I pretty much follow this. It all works fine, but my problem is that there are couple of end users who now tend to send the emails with attachments to us, but with Content-type as 'text/csv' or 'application/octet-stream' in which case Mule is unable to recognise/parse the attachments. The email client like outlook has no problems downloading the files. But does not work with Mule code - probably, the content-type to be blamed but is there a way I can get over this without demanding a change from the end user?
Here is the code that reads the attachments:
<expression-transformer doc:name="Read Attachments and set them as payload"
name="returnAttachments">
<return-argument evaluator="attachments-list"
expression="*" />
</expression-transformer>
<imaps:inbound-endpoint host="${email.server.host}"
port="${email.port}" responseTimeout="10000"
doc:name="IMAP" connector-ref="IMAPS" password="${email.pwd}"
transformer-refs="returnAttachments" user="${email.user}"
disableTransportTransformer="true" />
<!-- The code below does not work when the emails arrived have content type other the "multipart/mixed"-->
<set-variable variableName="fileName" value="#[groovy:payload.name]"
doc:name="fileName" />
As mentioned this one recognises the email and attachments when the content type(header) of the email is "mutipart/mixed". Does not work otherwise. Should I be asking the client to set the content type ?
Your question does not explain what exactly you're trying to do. You can send anything through e-mail. Each attachment is marked with a corresponding MIME type to indicate what sort of data format it contains -- is that an image, or a ZIP file, or perhaps a PDF document?
What is your application doing, and what reaction do you expect when I send, say, a holiday picture as an attachment? What should it do if I attach my bank's statement?
These questoins are about the business logic, about the real purpose of your project. This question does not contain any data about that, unfortunately.

Survey Monkey API: How to add email body as configured in surveymonkey UI?

I have configured my email collector to display the body in french and I sent survey invite through Survey Monkey. It worked well. Default template is used if this is not specified String in Survey Monkey API. Is there a way to get already configured email collector setup message to be sent? I want the emails to be in the language I had chosen in SM UI
The best way to create a new message based on a template right now is to copy a previous message.
To do this, you'll want to include the collector/message to use as a template when creating a new message like this:
POST /v3/collectors/{collector_id}/messages
{
"from_collector_id": "<collector_to_use_as_template>",
"from_message_id": "<message_to_use_as_template>"
}
Note that the message ID in the body needs to belong to the collector ID in the body.

Put the title of the first post in the subject of a MailChimp RSS campaign

I'm using MailChimp and RSS to send emails from my blog. I would like to use the first post title as the subject of the RSS email. When I try to do this, I get the following error:
Message Subject*
De InterMission Uitdaging van vandaag: *|RSSITEMS:|**|RSSITEM:URL|**|END:RSSITEMS|*
This field can not contain conditional merge tags
How do I do it correctly?
Ah, got it: *|RSSITEM:TITLE|* is actually sufficient.
Got it confirmed by the MailChimp people: https://longrep.ly/r/5e1ddb41.
Indeed that doesn't work in a perfect way. It will prepends a "[test]" to your email subject. And according to mailChimp's helpdesk, this tag is not officially allowed to put in the subject. Only valid tags are:
http://kb.mailchimp.com/article/merge-tag-cheatsheet-for-subject-lines/

How to implement email correlation with subject and body modification?

I have a system that sends mail.
I have a system that receives mail.
I need to identify that a received mail correlates with the one the other system sent.
The particular thing here is that either the subject or the body can be modified.
I thought on putting some hash in the header of the sent email, but I don't know where this could be added
Don't you have any clue?
As you did not supply enough detail for a language specific answer, I will explain the general approach.
You can add a custom header to your outbound email, using x-vendor-header style for the header (start with x- to mark it as an extension, then vendor- for your company and end with the header name. The can be a unique identifier for the email message.
You can look for this header in your inbound process to identify the message.
I've finally found the solution:
Most email's servers support to put something after the username using '+' as separator. So I can encrypt some id and decrypt it when is replied looking on the from address.
example:
neuquino+encryptedID123421234#gmail.com
I hope this can help someone else with the same problem

Embed indentifier within an Email

I am trying to embed an ID into an email so that when a recipient replies to an email that my system sends out, my system can pick it up and match the two together.
I have tried appending a custom header, however this is stripped out when the user replies.
I have tried embedding an HTML comment within the email, but outlook does not seem to keep comments when a reply email is created.
Worst case scenario, I can manually try and match the sent and received emails by time span or have a visible tag within the message body.
Does anyone know of a more elegant solution?
Thanks in advance
Email messages already contain such an identifiers, called Message-ID. And there's even a way to send which message you're replying to by sending that ID in a header called In-Reply-To. That's done by pretty much all email clients, that's how they usually do their threading.
It's defined in RFC 822 (yep that's pretty old) and probably re-defined and refined in more modern versions of that.
I have seen a method that includes a one byte image with a unique name that's linked to the user. When they view the email and download the images, your HTTP server will record a hit for that unique image. Of course the user needs to display images, but you can include a message in the body asking them to display the images. We actually include content in an image so they need to show images.
If your incoming e-mail can handle +foo or -foo suffixes, use that.
Many e-mail systems can route user+foo#example.com or user-foo#example.com
to user#example.com. You can replace foo with some kind of identifier.
Several mailing list servers use this for tracking bounces.
While I can't say for certain, my investigation in that sort of matter some time ago yielded the following "conclusion":
Headers are transformed a lot
Message bodies are transformed a lot
This is partly because, I suspect, of:
Need to protect users from malicious intentions
Need to perform "targeted marketing"
I have seen "unique codes" flying around in clear text in the email body but I would suggest having a unique identifier embedded in the return address instead.
The usual approach is to place the id in the subject line and/or somewhere visible in the message text and informing the recipient that he should not modify the subject or quote the original mail when responding.