Andre de Cavaignac

Let's blog it out...

.NET: Sending Email to Japanese Mobile Phones

Following up on my previous post about configuring ASP.NET for Japanese mobile phones, I thought I would write about another irritating aspect of developing for the Japanese mobile market: sending email to the fairly ubiquitous Japanese phone email system.

Oddly enough, the most advanced Japanese phones on the market are very picky about which content encoding and content transfer encoding they support.  Unicode does not seem to be an option (go figure), and it seems to me that the email gateway may be where the software bottleneck is, more than the phone itself.

Anyway, I started by trying to use the System.Net.Mail.SmtpClient.  In our tests, we found that the supported content-encoding was iso-2022-jp.  Nothing else.  Not unicode, not shift_js, just this somewhat awkward standard.  Fine.  So we set our MailMessage.BodyEncoding to this format, and found that the Japanese phones still would show jibberish, rather than real Japanese.  Sure enough, SmtpClient supports sets the content-transfer-encoding to quoted-printable, something the Japanese phones (or gateways) do not support.  After trying AlternateView and other classes in System.Net.Mail, we gave up trying to send using this class.  It simply was not possible.

Unfortunately, we were forced to use System.Web.Mail.MailClient to send our emails.  This is a crappy wrapper around CDO, and is deprecated in .NET 2.0.  The advantage, however, is that MailClient will send a MailMessage.BodyEncoding as 7bit, the required content-transfer-encoding for the Japanese mobile market.

 

In brief:

  • Japanese phones require:
    • content-encoding of iso-2022-jp
    • content-transfer-encoding of 7bit
  • System.Net.Mail does not send in 7bit encoding, unless you use AlternateView.  At this point, I could not get mail sent with AlternateView to display properly on the mobile device.
  • System.Web.Mail will send 7bit, but has the disadvantage of being depricated

Hope this helps someone! Best of luck!

Leave a Comment

(required) 

(required) 

(optional)

(required)