من با این کد میخام ایمیل ارسال کنم declare
l_mail_con utl_smtp.connection;
begin
l_mail_con:=utl_smtp.open_connection('smtp.gmail.com',25);
utl_smtp.ehlo(l_mail_con,'smtp.gmail.com');
utl_smtp.command(l_mail_con,'STARTTLS');
utl_smtp.command(l_mail_con,utl_encode.base64_encode(utl_raw.cast_to_raw('myemail@gmail.com')));
utl_smtp.command(l_mail_con,utl_encode.base64_encode(utl_raw.cast_to_raw('mypass')));
utl_smtp.mail(l_mail_con,'mymail@gmail.com');
utl_smtp.rcpt(l_mail_con,'receivermail.com');
utl_smtp.data(l_mail_con,'hi saeideh'||utl_tcp.crlf||utl_tcp.crlf);
utl_smtp.quit(l_mail_con);
end
ولی این خطا رو میده
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 54
ORA-06512: at "SYS.UTL_SMTP", line 138
ORA-06512: at "SYS.UTL_SMTP", line 219
ORA-06512: at line 7
وقتی دنبال دلیل خطا گشتم میگن که خطای اوزاکل نیست و SMTP SERVER سیستم عاملت UP نیست