I am trying to send german language emails (containing Umlauts) with
UTL_SMTP. Everything would be fine, if the package would act like a
normal telnet-session to the smtp-host. That means, when I am doing
smtp-communication by hand, and I am sending Umlauts, they are sent as
special characters, which are retranslated by normal german
mailclients. UTL_SMTP seems to have difficulties in handling those
Umlauts, and automatically translates an "ä" (=ae) to "a"...
Anybody knows why? Anybody knows how to send Umlaut-emails with
utl_smtp? (I thought this was the year 2000, not 1975.. ;-)
Thanks,
negg.
Sent via Deja.com http://www.deja.com/
Before you buy.
HTH,
Bastiaan Schaap
Oracle web development,
Desyde BV - Baarn
http://www.desyde.nl/
tel. +31355411711
negg <ne...@my-deja.com> wrote in message news:8m8qsk$f8v$1...@nnrp1.deja.com...
message := replace(message,'=', '=3D');
message := replace(message,'ä', '=E4');
message := replace(message,'ö', '=F6');
message := replace(message,'ü', '=FC');
message := replace(message,'Ä', '=C4');
message := replace(message,'Ö', '=D6');
message := replace(message,'Ü', '=DC');
message := replace(message,'ß', '=DF');
message := replace(message,'è', '=E8');
message := replace(message,'é', '=E9');
message := replace(message,'à', '=E0');
message := replace(message,'á', '=E1');
message := replace(message,'ë', '=EB');
c := utl_smtp.open_connection('webserver.example.com');
utl_smtp.helo(c, 'myserver.de');
utl_smtp.mail(c, 'm...@myserver.de');
utl_smtp.rcpt(c, p_Recipient);
utl_smtp.open_data(c);
send_header('From', p_From);
send_header('To', p_Recipient);
send_header('Subject', subject);
send_header('MIME-Version', '1.0');
send_header('Content-Type', 'text;');
send_header('Content-Transfer-Encoding', 'quoted-printable');
utl_smtp.write_data(c, utl_tcp.CRLF);
-- send small portions of the message to the smtp host because utl_smtp
-- can't send more than about 1000 chars at a time
enum := CEIL(LENGTH(message)/500);
FOR i IN 1 .. enum
LOOP
utl_smtp.write_data(c, SUBSTR(message,1+500*(i-1),500));
END LOOP;
-- close transmission
utl_smtp.close_data(c);
utl_smtp.quit(c);
Might not be perfect, but I am only a beginner to plsql...
I just can't seem to figure out how to encode the subject to transmit
Umlauts using 7bit characters only...maybe anybody knows?