Hi I am sending email attachments (using php) and would like to point out to the people that I send the emails to that there are attachments.
I want to do this by displaying a link in the html body of the email, so all they need to do is click the link and there system will try and open/view the attachment.
Does anyone know if this is this possible?
and if so any pointers/nudges in the right direction would be appreciated.
This will not work and it's a security concern, especially since links can be disguised and attachments can be dirty.
Add a big bold title with emphasis on the attachment, most users know how to download these from their (favorite) client.
Related
I have created an email template using Outlook 2013. In this template I have some images hosted on the web.
When i send the mail everything is seen Ok on the various Outlook version. But when the mail is seen on the Blackberry My mail seems ok but at the end of the mail, the images are also listed as attachments. So I see the correct template and the list of images. How can i prevent this behaviour? I need to keep the same behaviour as in the Outlook version (not display the listing of the images as attachments at the end of the mail)
Could you point me in the right direction?
Thank you so much.
As far as I know, there is no way to prevent Outlook from sending images as MIME attachments. Other Outlooks will interpret them correctly, whereas most email clients will see them at attachments.
I creating emails using partial views and saving them in DB (later they will be sent). I need to embed image into email to display in gmail. How to do this in ASP.NET MVC 2 project? How to embed image into view to make it work and display image in gmail?
You can't. Well, not reliably anyways. At least not in the way you mean. There is such a thing as data-url's, that allow you to embed an image into the page, but you will find that this is not widely supported by email clients and thus is not a reliable way to include images.
In fact, creating emails with embedded content is something of a black art. There are so many gotchas with various email client support that you have to do a lot of research into what does and doesn't work.
However, in general, what you want to do is use an embedded MIME image attachment in the email multi-part mime format, which has nothing whatsoever to do with MVC. All you would do in MVC is create your email with the appropriate tag (ie. <img src="cid:logo_sml.jpg">) to extract the mime content from the email, note that you won't see anything in a browser, as it only works in an email client.
You might want to read articles like these:
https://www.campaignmonitor.com/blog/post/3927/embedded-images-in-html-email
http://emailmarketing.comm100.com/email-marketing-tutorial/embedding-images-in-email.aspx
How to embed images in email
sending mail along with embedded image using asp.net
So using the gmail message source is it possible to generate, a link to the message/thread in GMail's own interface?
on http://productforums.google.com/forum/#!topic/gmail/goChl1gG0NQ they use the following
https://mail.google.com/mail/#all/<HexEncodeMessageID>
Is this related to the Message=ID header found in the mail's source?
Message-ID: <SomeID#SomeID.mail>
The discussion Find Gmail url-IDs via IMAP seems to only give IMAP based solutions.
Update
This bookmarklet no longer works. See Benjamin Ziepert's update.
Original Answer
I decided to make a bookmarklet to help automate this.
javascript:window.location="https://gmail.com/#search/rfc822msgid:"+encodeURIComponent(window.document.body.innerHTML.match(/Message-ID: <(.*)>/i)[1])+"/"+encodeURIComponent(window.location.search.toString().slice(1).split('&').filter(function(x){return x.slice(0,3) == "th="})[0].slice(3));
Save this link on your bookmarks bar.
To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.
If anyone has suggestions for a clean way to do this without having to click show original, I'm all ears.
The "HexEncodeMessageID" that you refer to (and that occurs in links such as https://mail.google.com/mail/#inbox/14197d2548c9da1a) is unfortunately different from the RFC822 message ID (which occurs in the source of the email).
I do not know of any way to get a direct link to an email using the RFC822 message ID, but it is possible to search for a particular RFC822 message ID in Gmail (see GMail doc):
in:anywhere rfc822msgid:SomeID#SomeID.mail
You can turn this into a link:
https://mail.google.com/mail/#search/in%3Aanywhere+rfc822msgid%3ASomeID#SomeID.mail
(Don't forget that the message id should be URL-encoded. You can also just type the search in your GMail and copy the resulting URL afterwards.)
The problem with this link is that it does not send you to the mail directly, but to a search result page with a single hit. But this might be good enough for some applications.
The advantage is: The RFC822 is the same in your account and in the account of the sender. So if you want to refer to a given email in an email/chat, you can provide this search link (assuming the recipient also uses GMail). With the "HexEncodeMessageID" this would not work, because it is different in every account (according to my own experiments).
One last thing: the link only works when you are already logged in.
Here's an updated bookmarklet over what Benjamin Ziepert suggested. Basically with removed /u/0 part to make it a little more account-independent.
javascript:window.open("https://mail.google.com/mail/#search/rfc822msgid%3A" + encodeURIComponent(document.getElementsByClassName('message_id')[0].innerHTML.slice(4, -4)), "_self");
Usage: Save this link on your bookmarks bar. To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.
I would like to be able to intercept a hyperlink from an email on BlackBerry.
e.g.
dummy site
I have been able to intercept and identify text in a plain text email using PatternRepository. However, it doesn't seem to work with HTML emails - is this even possible?
I would like to avoid the solution of scanning every incoming email myself, and parsing all the text, but this might be the only option.
Thanks
This is not possible (up to and including BlackBerry 6 afaik). It is not related to the hyperlink concept - it is not possible to use PatternRepository with any type of text within HTML text.
For performance reasons, the BlackBerry designers decided not to implement pattern matching within HTML fields (browser, or email). This is very unfortunate, but it must be dealt with.
In my app, I had the freedom to define the contents of the email. In my case, I ended up including the pattern into the subject of the email - the user can click on the subject to get to my app.
In most other situations, I think the best/only way forward is to intercept each mail as it arrives and parse it looking for the text. If I have to do that in the future, I'll try to update this post with some sample code.
There are various posts on the BlackBerry forums about this issue.
Richard
In my webapp i want to display user emails. But i dont want spam boots to steal my user emails. So have do i automatic create a image displaying there email?
Best regards,
A rails beginner
Creating an image is one way to go, but remember that OCR is getting to be an extremely "cheap" operation and isn't a guarantee that a bot wouldn't analyze all the pictures on your site to see if they contain text that looks like email addresses. There's plenty of techniques to "hide" addresses in plain sight. Write them out in character entity format, intersperse empty tags, uses javascript to decode an encoded form of them and insert into the page after load, etc...