Ich habe die folgende Prozedur, die ich aus dem Internet empfangenE-Mail schicken über PL/SQL-Skript
CREATE OR REPLACE PROCEDURE send_email (
p_sender IN VARCHAR2,
p_recipient IN VARCHAR2,
p_message IN VARCHAR2
)
AS
mailcon UTL_SMTP.connection;
BEGIN
mailcon := UTL_SMTP.open_connection ('localhost');
UTL_SMTP.helo (mailcon, 'localhost');
UTL_SMTP.mail (mailcon, p_sender);
UTL_SMTP.rcpt (mailcon, p_recipient);
UTL_SMTP.DATA (mailcon,
'From: '
|| p_sender
|| UTL_TCP.crlf
|| 'To: '
|| p_recipient
|| UTL_TCP.crlf
|| 'Subject: SMS From Database'
|| UTL_TCP.crlf
|| p_message
);
UTL_SMTP.quit (mailcon);
END;
Dieses Verfahren erfolgreich kompiliert wird. Während die Prozedur ausgeführt
exec SEND_email('[email protected]', '[email protected]','My first EMAIL');
ich die folgende Fehlermeldung
FEHLER in Zeile 1 erhalten:
ORA-29279: SMTP permanent error: 554 Can not connect to e-mail server. Error:100502
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 138
ORA-06512: at "PERFECT.SEND_SMS", line 9
ORA-06512: at line 1
Bitte helfen
Sind Sie sicher, dass ein Mail-Server lokal ausgeführt wird (z. B. 'localhost')? Schaffst du es, einfache E-Mails zu senden? –
@J.Chomel ja its in Lokaler Server – Abhijith
Mischen Sie "SMS" mit "E-Mail"? –