mimemessage

Smart quotes in a MimeMessage not showing up correctly in Outlook

Our application takes text from a web form and sends it via email to an appropriate user. However, when someone copy/pastes in the infamous "smart quotes" or other special characters from Word, things get hairy. The user types in he said “hello” to me—isn’t that nice? But when the message appears in Outlook 2003, it comes out l...

Setting the from name in a javax.mail.MimeMessage?

Currently, our application uses a javax.mail to send email, using javax.mail.MailMessage. We set the From headers of the email this way: Message msg = new MimeMessage(mailSession); msg.setFrom(new InternetAddress("[email protected]")); This works just fine, but we'd like to make the "From" section a little more user-friendly. Curren...

Unable to parse Java MIME mail message

I'm creating java MIMEMessage object from input stream. It is getting constructed properly without any problem. I'm also able to fetch body and attachments. But the problem is, when I receive some emails with some different formating, like from iPhone or from Blackberry, my parsing fails. I'm parsing Java MIMEMessage by myself. Here I...

Mule ESB - How to get MimeMessage instead of MimeBodyPart?

I'm trying to get the FROM email address in Mule ESB. I'm getting the retrieved object as MimeBodyPart, I'd like to have MimeMessage instead. How to do this? Any solution - either in Mule or Java is welcome. The Mule config part for inbound end-point is as below - <inbound> <pop3s:inbound-endpoint user="xxx%40gmail.com" password...

What are the valid characters for a Mime Multipart message ContentId "CID:" ?

From reading the RFC it appears that CID can/must only contain characters from the same set as those permissable by a regular URI. Is this correct. Im asking because I wish to writeup a simple helper that takes a CIDs prefix and adds a counter when generating CID for mime multitypes attachments. ...

Multiple signatures in S/MIME

Is it possible to sign a MIME email (RFC 2822) multiple times using S/MIME, so that all signatures are verifiable and retrievable? ...

mime decode pdf quoted-printable

Hi, I've been building a simple ticket system and it's all done and working except for when it receives PDF files via email that have been sent using quoted-printable encoding. I've tried using quoted_printable_decode(), the quoted-printable.decode stream filter, the later just created an empty file. I've also tried using $input = preg_...

How to add a message as an attachment on another message with javax.mail

Hello. I've got a mailer daemon that check a box and fetch the mails inside every X mins. When an error occurs, I need to send a alert mail, with the faulty message as an attachment. I dont want to create a file, write the content from the original message and then add the file to the error message, I want to directly set the MimeBodyP...

How to stop embedded images in email being displayed as attachments by GMail?

I am sending HTML emails with embedded images (as attachments) and the images display as expected in GMail. However they also show up as attachments under the email. Does anyone know how to avoid this i.e. I want them in the email only and not listed as attachments. I have used "Content-Disposition: inline". I am using Spring and JavaMai...