We require the users to reply in a specific format about their problems. Our current application sends an auto-generated mail which has a mailto embedded like this
Contact Application Team
What we want now is to include a table in the embedded "mailto" so that user can describe their problems in much better way. We have tried encoding html inside mailto body, but it gets treated as simple text.
Is there any way to include the table in the mailto body or any better way to improve the interaction.
It is not possible to include HTML in the mailto body, as defined in Section 2 of RFC 2368.
Possible alternate solutions:
Have users type their information into an HTML form and then use PHP (or similar server side language) to send the email
Try to format your email a little bit nicer by adding in some line breaks. You can use %0D (Carriage Return) followed by %0A (Line Feed). Maybe something like this:
Contact Application Team
Related
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.
Are there examples of sending simple HTML formatted emails (<h1>, <b> and such) out from Plone?
Plain text is well-covered, but there are no HTML email out examples.
You can adapt any of the many python email module examples. Because HTML email usually means sending multipart/alternative messages, things get a little more complicated.
The examples page of the email package.
Sending HTML email using Python
Sending Multipart html emails which contain embedded images
You basically have to construct an email.Message object and pass that to Mailhost.send.
Depending on your use case, you could also use collective.watcherlist.
This was factored out of Products.Poi, which uses it to allow users to subscribe to updates for an issue. That part may not be interesting for you, but it has code that takes a browserview as basis for sending an email. Hooking a page template up to that browserview is of course simple.
If you cannot use it directly, it may serve as a code example.
I need to hide a 30 character string inside the HTML of an e-mail so when a user replies, their reply can be linked on our server to that 30 character string. We don't want to add the string to the subject or body of the e-mail where it's visible to the user. We also don't want to hide the text which would result in accidental selecting of the 30 character string.
The problem:
Many e-mail clients (like gmail) reduce HTML e-mail content to just the basic tags, making it difficult to find a tag that can hold an arbitrary string. This means we can't create an arbitrary tag, only use standard tags.
Our best solution:
Hide the string in the "title" tag of a table in the e-mail, like this -
<table title="30_character_string">
The solution above works in most cases. Most e-mail clients don't strip out the title tag, making it a viable option.
Why we're stuck: This isn't the best solution because sometimes e-mail clients get very restrictive and eliminate even the title attribute.
Can you help? What is the most successful way to hide an arbitrary string in the body of an HTML e-mail? Is there a better solution for this sort of linking?
If you put the value in markup, plain text replies won't work. Consider a "smallprint" section on the bottom of your email below your signature.
Dear User,
Email content
Regards,
Logo and such
ReplyIdentifer-xxxxxxxx.
If you don't care for that, add a div to the bottom of the email (again below the sig). ANd again, it will be on the bottom of the email where the user will rarely even care to look.
<style>.hide{display:none;}</style>
<div style="display:none" class="hide">ReplyIdentifer-xxxxxxxx.</div>
In this case, you only see it if the email client removes css AND style tags.
Checking some HTML emails I've received & Gmail seems to allow a <head> tag within the e-mail HTML. You could include the info in a <meta> tag within the head of the email.
What type of account are you reading mail in to? If it's also Gmail, you could make use of their ability to allow abritary strings in your emails address after a plus symbol. Override the reply-to header that you set on your out-going mail to youraddress+uniqueID#gmail.com
EDIT: Staying along the lines of e-mail headers though (which feels like it should be the right way to do this), if you make sure to generate a unique Message ID header for each copy of the mail going out, the In-Reply-To header that you get back should be unique to that recipient and that message. Gmail respects the Message ID header & provides the appropriate reply header in response, as should most (all?) mainstream clients/services
I'm trying to use an html email signature that pulls the html from another site. So, imagine I have the html hosted at blahblah.com/blah.html, and blah.html is:
<html>
<body>
Jon Jones
jon#blahblah.com
</body>
</html
And then my html signature would be something like <embed src="blahblah.com/blah.html/> that way I can manipulate the signature without having to constantly change the actual signature in Outlook (which I use to check my email).
I can't figure out any html that will do what I'm trying to do. The embed tag that I posted above doesn't do the trick. What simple line of html can I use to say "display what you find at blahblah.com/blah.html"
I would venture a guess and say this isn't the best way to do this.
From a security standpoint, I wouldn't want to be viewing any email sent by you that also brings in somesite.com/signature.htm. Even if it did, it would invoke a "click to view linked elements in this email" banner, and hide it until I did so (but chances are I'm not clicking).
From a recipient stand point, some spam filters block emails with externally-linked content (your intended recipient may not even get your email, or (best-case) see it with [spam] in the subject line.)
If you want an easy up-keep, you could place the signature in your my documents/some other folder and link to it via outlook's settings, but that about the least intense method (while also not causing concerns or issues to anyone viewing your email.)
It looks like instructions for what you want are here: http://www.emailaddressmanager.com/tips/html-email.html
Under "How to add HTML links in Outlook HTML emails," point to blahblah.com/blah.html
On the other hand, HTML in emails is generally not a great thing because it often isn't very secure (you could send me a page with HTML that would load a virus), so many clients won't be able to recieve it or will flag it as spam.
How can i code a HTML (using CSS) file to send an email to me(i.e. to given email-id) by the visitor of that website?
Without using a server-side language, the best you can really do is a mailto link. That will open the user's default email editor with the "To" field populated with the value of your mailto link. You can create one of those like so:
Email Me!
It is possible to provide extra information in a mailto link, to populate more fields. For example, if you want to provide a subject:
Email Me!
You can also provide a value for the body, cc and bcc but I have no idea how well those default values are supported by various email clients.
Also note that this has absolutely nothing whatsoever to do with CSS, which is used for styling documents. I've therefore removed the CSS tag from your question.
You cannot. You can use a tag:
Email Me
And this will open a mail client in the client side. The client must have it configured for being able to send a email.
If you want to create a form that, when the user presses a button "send" sends you a message, you must use a dynamic language such as PHP.