Hi All,
I have taken over some code that listens on port 25 and does the
following:
private byte[] buffer = new byte[BufferSize]; // Receive buffer.
While there is data:
......
bytesRead = clientSocket.Re ceive(buffer, 0, 1024, SocketFlags.Non e);
......
content = Encoding.ASCII. GetString(buffe r,0,bytesRead);
my problem is that when I receive japanese chars they are represented
as:
=E5=8C and so on. Surely this isn't right? I tried:
content2 = Encoding.Unicod e.GetString(buf fer,0,bytesRead );
and this just converts all the text, be it ascii or not to garbage. If
someone could point me in the right direct that would be great. I
guess what I'm after is how should I read the stream to make the best
use of the data. Is there a way of knowing the incoming encoding for
SMTP?
Basically what the system does is:
listens on port 25; reads the message; changes a string in the message
and then inserts the blob into a database; the blob is then sent on to
a list of people as an email
Cheers
-m 0 944 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andy Turner |
last post by:
Hi, I'm trying to setup PHP so it will use a remote SMTP server.
I'm going to sound like a newbie but how? I know you need to alter
php.ini, change SMTP from localhost to the SMTP server and the address
to the correct one but I wondered about passwords? Outlook Express
needs a password so how would I do it.
Unless anyone has any other suggestions/tutorials. Oh and just so you
know my port 25 is blocked by ISP, I think that limits my...
|
by: David |
last post by:
Hi Group,
I'm having a few problems with getting an SMTP server configured on my
Windows 2000 Server web server. My web server is co-located at my hosts and
i use VNC to remotely access the web server. Acting on advice from my host
IIS's SMTP server has been disabled by running the IIS lockdown Tool. I
have internal access to my hosts SMTP server where i can send mail from my
web site to my own domain email address only, i am not...
|
by: Vishal |
last post by:
Hello!
My client has a need to be able to store Japanese characters in their
PeopleSoft database. So we need to change the character set from from
Latin1_General (1252) to Japanese character set (932) on SQL Server
2000 Enterprise. I have 2 questions:
1) I would like to know if in SQL Server, the character set is machine
specific or is it defined at the database instance level?
2) Can multiple installs of SQL Server co-exist on a single...
|
by: Andreas |
last post by:
I am working with three computers, my developing computer, a Web Server and a
Mail Server (Exchange).
I am trying to send a email from the Web Server via the Mail Server to a
valid email address with this code:
MailMessage msgMail = new MailMessage();
msgMail.To = "test@address.com";
msgMail.From = "from@address.com";
msgMail.Subject = "Mail Example Subject";
|
by: Dave |
last post by:
Hello,
I am trying to write an application that will talk to an SMTP server
using sockets. I can connect to the server just fine, then I can
receive the first message from the server. I can then send out a
command to the server, but after that the thing just hangs when I am
waiting for a response. I can't understand why this is happening. I am
new to this language, so this might be something obvious that I am
overlooking. Any help would...
| |
by: antonyliu2002 |
last post by:
I've set up the virtual smtp server on my IIS 5.1 like so:
1. Assign IP address to "All Unassigned", and listen to port 25.
2. Access Connection granted to "127.0.0.1".
3. Relay only allow "127.0.0.1".
4. Authentication: "Anonymous access" only.
5. Outbound connection listen to TCP 25.
Besides,
|
by: apprentice |
last post by:
Hello,
I'm writing an class library that I imagine people from different countries
might be interested in using, so I'm considering what needs to be provided
to support foreign languages, including asian languages (chinese, japanese,
korean, etc).
First of all, strings will be passed to my class methods, some of which
based on the language (and on the encoding) might contain characters that
require more that a single byte.
|
by: Marco Miltenburg |
last post by:
While working on some multilingual code I found a rather strange thing
happening with Server.HTMLEncode.
While loading different languages I change the Codepage and Charset in
ASP to reflect the language. This all works fine. However when I tried
to use Charset UTF-8 with Codepage 65001 everywhere I found that
HTMLEncode always translates all UTF-8 characters to &#xxxx.
Example:
|
by: jlconde |
last post by:
I have a classe to send mails. It runs on yahoo well but with hotmail I never receive the mails.I do not receive an error neither.
I would need some strange header to make the hotmail like my email????
My code is:
import java.net.*;
import java.io.*;
import java.util.*;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |