Originally posted by Krish Vasu:
Hi,
Thanks for the update.
We are sending the email content in the text format by writing to a Socket.
What should be ideal charset the client needs to configure in their email client.
I have been informed by the user that they are using Lotus Notes as their emial client.
Pls, advice. Thanks...
Bad idea!!!
Socket connections, although appear to work in a standard way, are notorious when it comes to SMTP server side implementation. For example, not long ago we had a situation, where if the application was sending email via Sendmail server, by doing socket communication on port 25, the body of the email disappeared, but the same code when it ran against Domino mail server ran fine!!!
turned out, that the exact format that u need to send the SMTP commands varies with the SMTP implementation:
for sendmail it is
helo
mail from:
rctp to:
data
subject:
<actual body>
.
With domino, it was
helo
mail from:
rctp to:
data
subject:
<actual body>
.
The number of CR-LF that you put between SMTP commands is different!!!
I would suggest that you resort to using Java mail api as it will take care of all the various permutation/combinations that exist for various SMTP implementations, not to mention it keeps the code clean